@superdurable/connector-clickup 0.1.3 → 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 +5 -3
- package/dex-connector.json +11 -1
- package/dist/{connection-CyZGpZRT.d.ts → connection-CIEP4aiP.d.ts} +1 -1
- package/dist/index.d.ts +112 -9
- package/dist/index.js +326 -4
- package/dist/mock.d.ts +1 -1
- package/package.json +3 -2
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
|
| --- | --- | --- |
|
|
@@ -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
|
@@ -4,7 +4,7 @@
|
|
|
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
|
{
|
|
@@ -620,6 +620,16 @@
|
|
|
620
620
|
],
|
|
621
621
|
"type": "object"
|
|
622
622
|
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "defineTaskEventTriggerBinding",
|
|
626
|
+
"kind": "trigger",
|
|
627
|
+
"triggerName": "taskEvent",
|
|
628
|
+
"fields": {
|
|
629
|
+
"connectionName": "connectionName",
|
|
630
|
+
"bindingName": "bindingName",
|
|
631
|
+
"configurationUI": "configurationUI"
|
|
632
|
+
}
|
|
623
633
|
}
|
|
624
634
|
]
|
|
625
635
|
}
|
|
@@ -608,4 +608,4 @@ declare function newConnection(client: Operations, reference: ConnectionRef): Co
|
|
|
608
608
|
/** Bind scripted operations to a named connection. */
|
|
609
609
|
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
610
610
|
|
|
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
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { A as AddCommentInput, a as AddCommentOutput, C as Connection, b as CreateTaskInput, c as CreateTaskOutput, F as FindMemberByEmailInput, M as Member, G as GetTaskInput, T as Task, S as SearchTasksInput, d as SearchTasksOutput, U as UpdateTaskInput, e as UpdateTaskOutput, f as UpdateTaskTagsInput, g as UpdateTaskTagsOutput,
|
|
2
|
-
export { j as AddCommentInputSchema, k as AddCommentOutputSchema, l as ConfigSchema, m as CreateTaskInputSchema, n as CreateTaskOutputSchema, o as CredentialMaterialError, p as CredentialSource, q as CustomFieldInput, r as CustomFieldInputSchema, s as CustomFieldValue, t as CustomFieldValueSchema, u as FindMemberByEmailInputSchema, v as GetTaskInputSchema, w as MemberSchema, x as SearchTasksInputSchema, y as SearchTasksOutputSchema, z as TaskSchema, B as TaskStatus, D as TaskStatusSchema, E as UpdateTaskInputSchema, H as UpdateTaskOutputSchema, I as UpdateTaskTagsInputSchema, J as UpdateTaskTagsOutputSchema, K as User, L as UserSchema, N as decodeCredentials, P as isCredentialMaterialError, Q as newConnection, R as newConnectionWithOperations } from './connection-
|
|
1
|
+
import { A as AddCommentInput, a as AddCommentOutput, C as Connection, b as CreateTaskInput, c as CreateTaskOutput, F as FindMemberByEmailInput, M as Member, G as GetTaskInput, T as Task, S as SearchTasksInput, d as SearchTasksOutput, U as UpdateTaskInput, e as UpdateTaskOutput, f as UpdateTaskTagsInput, g as UpdateTaskTagsOutput, h as Credentials, i as Config, O as Operations } from './connection-CIEP4aiP.js';
|
|
2
|
+
export { j as AddCommentInputSchema, k as AddCommentOutputSchema, l as ConfigSchema, m as CreateTaskInputSchema, n as CreateTaskOutputSchema, o as CredentialMaterialError, p as CredentialSource, q as CustomFieldInput, r as CustomFieldInputSchema, s as CustomFieldValue, t as CustomFieldValueSchema, u as FindMemberByEmailInputSchema, v as GetTaskInputSchema, w as MemberSchema, x as SearchTasksInputSchema, y as SearchTasksOutputSchema, z as TaskSchema, B as TaskStatus, D as TaskStatusSchema, E as UpdateTaskInputSchema, H as UpdateTaskOutputSchema, I as UpdateTaskTagsInputSchema, J as UpdateTaskTagsOutputSchema, K as User, L as UserSchema, N as decodeCredentials, P as isCredentialMaterialError, Q as newConnection, R as newConnectionWithOperations } from './connection-CIEP4aiP.js';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
|
-
import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider, ReceiptDraft, Failure } from '@superdurable/connectors-sdk';
|
|
4
|
+
import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider, TriggerLogger, ReceiptDraft, Failure, TriggerTarget, TriggerRunner, TriggerContext, ConnectorConfigurationUI, TriggerDefinition, TriggerBindingDefinition } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { StepTarget } from '@superdurable/dex';
|
|
6
6
|
import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
|
|
7
7
|
import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
|
|
8
|
-
import '
|
|
8
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
9
|
+
import { WebhookEndpoint } from '@superdurable/connectors-sdk/webhooktrigger';
|
|
10
|
+
import { z } from 'zod';
|
|
9
11
|
|
|
10
12
|
/** Stable connector identity. */
|
|
11
13
|
declare const ConnectorID = "clickup";
|
|
@@ -346,9 +348,6 @@ interface FindMemberByEmailStepConfig<StepInput, OperationInput = FindMemberByEm
|
|
|
346
348
|
/** Build the findMemberByEmail Step from a named connection. */
|
|
347
349
|
declare function newFindMemberByEmailStep<StepInput, OperationInput = FindMemberByEmailInput, OperationOutput = Member>(configuration: FindMemberByEmailStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
|
|
348
350
|
|
|
349
|
-
/** Open one named ClickUp connection declared in a Dex project. */
|
|
350
|
-
declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
|
|
351
|
-
|
|
352
351
|
/** Search one Workspace task page. */
|
|
353
352
|
declare class SearchTasksOperation implements Query<SearchTasksInput, SearchTasksOutput> {
|
|
354
353
|
private readonly client;
|
|
@@ -424,6 +423,7 @@ interface ClickUpClientOptions {
|
|
|
424
423
|
now?: () => Date;
|
|
425
424
|
/** Override only with a ClickUp compatible test endpoint. */
|
|
426
425
|
apiBaseURL?: string;
|
|
426
|
+
/** Destination of secret-safe Trigger records. */ logger?: TriggerLogger;
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
429
429
|
* Outcome of one ClickUp HTTP exchange; `status` is the HTTP status of a response without a usable body, or 0.
|
|
@@ -443,7 +443,10 @@ type Exchange = {
|
|
|
443
443
|
declare class ClickUpClient {
|
|
444
444
|
private readonly endpoint;
|
|
445
445
|
private readonly maxResponseBytes;
|
|
446
|
-
|
|
446
|
+
readonly credentials: CredentialProvider<Credentials>;
|
|
447
|
+
/** Largest accepted webhook body in bytes. */ readonly webhookMaxBodyBytes: number;
|
|
448
|
+
/** Destination of Trigger records. */ readonly triggerLogger: TriggerLogger;
|
|
449
|
+
/** Clock for webhook receipt times. */ readonly triggerNow: () => Date;
|
|
447
450
|
private readonly send;
|
|
448
451
|
private readonly now;
|
|
449
452
|
/** Validate the client configuration without contacting ClickUp. */
|
|
@@ -466,4 +469,104 @@ declare class ClickUpClient {
|
|
|
466
469
|
private outcome;
|
|
467
470
|
}
|
|
468
471
|
|
|
469
|
-
|
|
472
|
+
/** Open one named ClickUp connection declared in a Dex project. */
|
|
473
|
+
declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: ClickUpClientOptions): Connection<Operations>;
|
|
474
|
+
|
|
475
|
+
/** Supported ClickUp task webhook events in Go's stable order. */
|
|
476
|
+
declare const TaskEvents: readonly ["taskCreated", "taskUpdated", "taskDeleted", "taskPriorityUpdated", "taskStatusUpdated", "taskAssigneeUpdated", "taskDueDateUpdated", "taskTagUpdated", "taskMoved", "taskCommentPosted", "taskCommentUpdated", "taskTimeEstimateUpdated", "taskTimeTrackedUpdated"];
|
|
477
|
+
/** Event filter of one taskEvent binding; an empty list accepts every supported event. */
|
|
478
|
+
declare const TaskEventTriggerConfigurationSchema: z.ZodObject<{
|
|
479
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
480
|
+
}, z.core.$strict>;
|
|
481
|
+
/** One taskEvent binding's event filter. */
|
|
482
|
+
type TaskEventTriggerConfiguration = z.infer<typeof TaskEventTriggerConfigurationSchema>;
|
|
483
|
+
/** One ClickUp task history item, with status names and no changed values. */
|
|
484
|
+
declare const TaskHistoryItemSchema: z.ZodObject<{
|
|
485
|
+
id: z.ZodString;
|
|
486
|
+
field: z.ZodString;
|
|
487
|
+
occurredAt: z.ZodOptional<z.ZodString>;
|
|
488
|
+
userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<Readonly<{
|
|
489
|
+
rawJSON: string;
|
|
490
|
+
}>, Readonly<{
|
|
491
|
+
rawJSON: string;
|
|
492
|
+
}>>]>>;
|
|
493
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
494
|
+
statusBefore: z.ZodOptional<z.ZodString>;
|
|
495
|
+
statusAfter: z.ZodOptional<z.ZodString>;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
/** One ClickUp task history item. */
|
|
498
|
+
type TaskHistoryItem = z.infer<typeof TaskHistoryItemSchema>;
|
|
499
|
+
/** One verified task webhook, with an event ID stable across ClickUp redelivery. */
|
|
500
|
+
declare const TaskEventSchema: z.ZodObject<{
|
|
501
|
+
eventId: z.ZodString;
|
|
502
|
+
webhookId: z.ZodString;
|
|
503
|
+
event: z.ZodString;
|
|
504
|
+
taskId: z.ZodString;
|
|
505
|
+
historyItems: z.ZodArray<z.ZodObject<{
|
|
506
|
+
id: z.ZodString;
|
|
507
|
+
field: z.ZodString;
|
|
508
|
+
occurredAt: z.ZodOptional<z.ZodString>;
|
|
509
|
+
userId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<Readonly<{
|
|
510
|
+
rawJSON: string;
|
|
511
|
+
}>, Readonly<{
|
|
512
|
+
rawJSON: string;
|
|
513
|
+
}>>]>>;
|
|
514
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
515
|
+
statusBefore: z.ZodOptional<z.ZodString>;
|
|
516
|
+
statusAfter: z.ZodOptional<z.ZodString>;
|
|
517
|
+
}, z.core.$strip>>;
|
|
518
|
+
occurredAt: z.ZodString;
|
|
519
|
+
}, z.core.$strip>;
|
|
520
|
+
/** One verified task webhook. */
|
|
521
|
+
type TaskEvent = z.infer<typeof TaskEventSchema>;
|
|
522
|
+
/** Manifest definition of taskEvent. */
|
|
523
|
+
declare const TaskEventTriggerDefinition: TriggerDefinition;
|
|
524
|
+
/** ClickUp event picker UI unit. */ declare const UIUnitTaskEventPicker = "taskEventPicker";
|
|
525
|
+
/** Event picker output port. */ declare const UITaskEventPickerPortEvents = "events";
|
|
526
|
+
/** Static taskEvent binding shown in Dex Web. */
|
|
527
|
+
interface TaskEventTriggerBindingConfig {
|
|
528
|
+
/** Connection name. */ connectionName: string;
|
|
529
|
+
/** Binding name. */ bindingName: string;
|
|
530
|
+
/** Connector Studio units. */ configurationUI: ConnectorConfigurationUI;
|
|
531
|
+
}
|
|
532
|
+
/** Declare a static taskEvent binding. */
|
|
533
|
+
declare function defineTaskEventTriggerBinding(config: TaskEventTriggerBindingConfig): TriggerBindingDefinition;
|
|
534
|
+
/** One taskEvent binding and its target. */
|
|
535
|
+
interface TaskEventTriggerConfig {
|
|
536
|
+
/** ClickUp connection. */ connection: Connection;
|
|
537
|
+
/** Static connection name. */ connectionName: string;
|
|
538
|
+
/** Static binding name. */ bindingName: string;
|
|
539
|
+
/** Event filter. */ configuration: TaskEventTriggerConfiguration;
|
|
540
|
+
/** Delivery target. */ target: TriggerTarget<TaskEvent>;
|
|
541
|
+
}
|
|
542
|
+
/** Create a taskEvent Trigger from a connection's shared webhook endpoint. */
|
|
543
|
+
declare function newTaskEventTrigger(config: TaskEventTriggerConfig): TriggerRunner;
|
|
544
|
+
/** HTTP handler of one ClickUp connection; it answers 503 while no binding receives events. */
|
|
545
|
+
interface TaskEventWebhookHandler {
|
|
546
|
+
/** Verify and acknowledge a delivery. */ serveHTTP(request: IncomingMessage, response: ServerResponse): Promise<void>;
|
|
547
|
+
/** Running bindings. */ runningSourceCount(): number;
|
|
548
|
+
}
|
|
549
|
+
/** Return the endpoint shared by every taskEvent binding of a connection. */
|
|
550
|
+
declare function taskEventWebhookHandler(connection: Connection): TaskEventWebhookHandler;
|
|
551
|
+
/** One stored taskEvent binding routed through its durable inbox. */
|
|
552
|
+
interface ProjectTaskEventTriggerRoute {
|
|
553
|
+
/** Stored binding name. */ bindingName: string;
|
|
554
|
+
/** Application target. */ target: TriggerTarget<TaskEvent>;
|
|
555
|
+
}
|
|
556
|
+
/** Serve and run a connection's taskEvent bindings. */
|
|
557
|
+
declare class TaskEventEndpointRunner {
|
|
558
|
+
#private;
|
|
559
|
+
private readonly endpoint;
|
|
560
|
+
/** @internal Construct through newProjectTaskEventEndpointRunner. */
|
|
561
|
+
constructor(endpoint: WebhookEndpoint<Credentials, TaskEvent>, runners: readonly TriggerRunner[]);
|
|
562
|
+
/** Verify, record, and acknowledge one delivery, or answer 503 until pending events have replayed. */
|
|
563
|
+
serveHTTP(request: IncomingMessage, response: ServerResponse): Promise<void>;
|
|
564
|
+
/** Replay durable inboxes, then deliver new events until stopped. */
|
|
565
|
+
run(context: TriggerContext): Promise<void>;
|
|
566
|
+
/** Number of bindings ready to receive. */
|
|
567
|
+
runningSourceCount(): number;
|
|
568
|
+
}
|
|
569
|
+
/** Load stored bindings and wrap every target in a durable project inbox before webhook acknowledgement. */
|
|
570
|
+
declare function newProjectTaskEventEndpointRunner(project: LoadedProject, connectionName: string, routes: readonly ProjectTaskEventTriggerRoute[], options?: ClickUpClientOptions): TaskEventEndpointRunner;
|
|
571
|
+
|
|
572
|
+
export { AddCommentBranch, AddCommentBranchAdded, AddCommentBranchDefect, AddCommentBranchNotFound, AddCommentBranchProviderRejected, AddCommentBranchUncertain, AddCommentDefinition, AddCommentInput, AddCommentMetadata, AddCommentOperation, AddCommentOutput, type AddCommentStepConfig, ClickUpClient, type ClickUpClientOptions, type ClickUpRequestSender, Config, Connection, ConnectorID, CreateTaskBranch, CreateTaskBranchCreated, CreateTaskBranchDefect, CreateTaskBranchNotFound, CreateTaskBranchProviderRejected, CreateTaskBranchUncertain, CreateTaskDefinition, CreateTaskInput, CreateTaskMetadata, CreateTaskOperation, CreateTaskOutput, type CreateTaskStepConfig, Credentials, type Exchange, FindMemberByEmailBranch, FindMemberByEmailBranchDefect, FindMemberByEmailBranchFound, FindMemberByEmailBranchInvalidResponse, FindMemberByEmailBranchNotFound, FindMemberByEmailBranchProviderRejected, FindMemberByEmailDefinition, FindMemberByEmailInput, FindMemberByEmailMetadata, FindMemberByEmailOperation, type FindMemberByEmailStepConfig, GetTaskBranch, GetTaskBranchDefect, GetTaskBranchFound, GetTaskBranchInvalidResponse, GetTaskBranchNotFound, GetTaskBranchProviderRejected, GetTaskDefinition, GetTaskInput, GetTaskMetadata, GetTaskOperation, type GetTaskStepConfig, Member, Operations, type ProjectTaskEventTriggerRoute, ProviderID, SearchTasksBranch, SearchTasksBranchDefect, SearchTasksBranchInvalidResponse, SearchTasksBranchNotFound, SearchTasksBranchProviderRejected, SearchTasksBranchSearched, SearchTasksDefinition, SearchTasksInput, SearchTasksMetadata, SearchTasksOperation, SearchTasksOutput, type SearchTasksStepConfig, Task, type TaskEvent, TaskEventEndpointRunner, TaskEventSchema, type TaskEventTriggerBindingConfig, type TaskEventTriggerConfig, type TaskEventTriggerConfiguration, TaskEventTriggerConfigurationSchema, TaskEventTriggerDefinition, type TaskEventWebhookHandler, TaskEvents, type TaskHistoryItem, TaskHistoryItemSchema, UITaskEventPickerPortEvents, UIUnitTaskEventPicker, UpdateTaskBranch, UpdateTaskBranchDefect, UpdateTaskBranchInvalidResponse, UpdateTaskBranchNotFound, UpdateTaskBranchProviderRejected, UpdateTaskBranchUpdated, UpdateTaskDefinition, UpdateTaskInput, UpdateTaskMetadata, UpdateTaskOperation, UpdateTaskOutput, type UpdateTaskStepConfig, UpdateTaskTagsBranch, UpdateTaskTagsBranchDefect, UpdateTaskTagsBranchInvalidResponse, UpdateTaskTagsBranchNotFound, UpdateTaskTagsBranchProviderRejected, UpdateTaskTagsBranchUpdated, UpdateTaskTagsDefinition, UpdateTaskTagsInput, UpdateTaskTagsMetadata, UpdateTaskTagsOperation, UpdateTaskTagsOutput, type UpdateTaskTagsStepConfig, defineTaskEventTriggerBinding, newAddCommentStep, newCreateTaskStep, newFindMemberByEmailStep, newGetTaskStep, newProjectConnection, newProjectTaskEventEndpointRunner, newSearchTasksStep, newTaskEventTrigger, newUpdateTaskStep, newUpdateTaskTagsStep, taskEventWebhookHandler };
|
package/dist/index.js
CHANGED
|
@@ -171,7 +171,7 @@ import { z } from "zod";
|
|
|
171
171
|
|
|
172
172
|
// src/client.ts
|
|
173
173
|
import { BodyTooLargeError, ProviderStalledError, ProviderTransportError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
|
|
174
|
-
import { ReauthorizationRequiredError, SecretString } from "@superdurable/connectors-sdk";
|
|
174
|
+
import { defaultTriggerLogger, ReauthorizationRequiredError, SecretString } from "@superdurable/connectors-sdk";
|
|
175
175
|
import { ConnectionNotSelectedError, CredentialBrokerRejectedError, ObjectNotFoundError } from "@superdurable/connectors-sdk/projectconfig";
|
|
176
176
|
|
|
177
177
|
// src/operations.ts
|
|
@@ -909,6 +909,12 @@ var ClickUpClient = class {
|
|
|
909
909
|
endpoint;
|
|
910
910
|
maxResponseBytes;
|
|
911
911
|
credentials;
|
|
912
|
+
/** Largest accepted webhook body in bytes. */
|
|
913
|
+
webhookMaxBodyBytes;
|
|
914
|
+
/** Destination of Trigger records. */
|
|
915
|
+
triggerLogger;
|
|
916
|
+
/** Clock for webhook receipt times. */
|
|
917
|
+
triggerNow;
|
|
912
918
|
send;
|
|
913
919
|
now;
|
|
914
920
|
/** Validate the client configuration without contacting ClickUp. */
|
|
@@ -917,6 +923,10 @@ var ClickUpClient = class {
|
|
|
917
923
|
this.endpoint = validateBaseURL(options.apiBaseURL ?? apiBaseURL);
|
|
918
924
|
this.maxResponseBytes = config.maxResponseBytes ?? defaultMaxResponseBytes;
|
|
919
925
|
if (!Number.isSafeInteger(this.maxResponseBytes) || this.maxResponseBytes <= 0) throw new TypeError("ClickUp maxResponseBytes must be positive");
|
|
926
|
+
this.webhookMaxBodyBytes = config.webhookMaxBodyBytes ?? 1048576;
|
|
927
|
+
if (!Number.isSafeInteger(this.webhookMaxBodyBytes) || this.webhookMaxBodyBytes <= 0) throw new TypeError("ClickUp webhookMaxBodyBytes must be positive");
|
|
928
|
+
this.triggerLogger = options.logger ?? defaultTriggerLogger;
|
|
929
|
+
this.triggerNow = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
920
930
|
this.credentials = credentials;
|
|
921
931
|
this.send = options.send ?? sendProviderRequest;
|
|
922
932
|
this.now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
@@ -1051,7 +1061,7 @@ function readErrorCode(body) {
|
|
|
1051
1061
|
}
|
|
1052
1062
|
|
|
1053
1063
|
// src/project.ts
|
|
1054
|
-
function newProjectConnection2(project, connectionName) {
|
|
1064
|
+
function newProjectConnection2(project, connectionName, options = {}) {
|
|
1055
1065
|
return newProjectConnection(project, connectionName, (loadedProject, name) => {
|
|
1056
1066
|
const selected = loadedProject.configuration.connections.find((entry) => entry.connectorId === "clickup" && entry.connectionName === name);
|
|
1057
1067
|
if (!selected) throw new TypeError("ClickUp project connection is not configured");
|
|
@@ -1064,9 +1074,309 @@ function newProjectConnection2(project, connectionName) {
|
|
|
1064
1074
|
return { apiToken: new SecretString2(decoded.api_token), ...decoded.webhook_secret ? { webhookSecret: new SecretString2(decoded.webhook_secret) } : {} };
|
|
1065
1075
|
}
|
|
1066
1076
|
};
|
|
1067
|
-
return new ClickUpClient(config, credentials);
|
|
1077
|
+
return new ClickUpClient(config, credentials, options);
|
|
1068
1078
|
});
|
|
1069
1079
|
}
|
|
1080
|
+
|
|
1081
|
+
// src/trigger.ts
|
|
1082
|
+
import { createHmac, timingSafeEqual } from "crypto";
|
|
1083
|
+
import {
|
|
1084
|
+
mustTriggerBindingDefinition,
|
|
1085
|
+
newTrigger
|
|
1086
|
+
} from "@superdurable/connectors-sdk";
|
|
1087
|
+
import {
|
|
1088
|
+
decodeTriggerConfiguration,
|
|
1089
|
+
newDurableTriggerTarget
|
|
1090
|
+
} from "@superdurable/connectors-sdk/projectconfig";
|
|
1091
|
+
import {
|
|
1092
|
+
WebhookEndpoint,
|
|
1093
|
+
WebhookEndpointRunner,
|
|
1094
|
+
WebhookVerificationUnavailableError
|
|
1095
|
+
} from "@superdurable/connectors-sdk/webhooktrigger";
|
|
1096
|
+
import { z as z2 } from "zod";
|
|
1097
|
+
var TaskEvents = [
|
|
1098
|
+
"taskCreated",
|
|
1099
|
+
"taskUpdated",
|
|
1100
|
+
"taskDeleted",
|
|
1101
|
+
"taskPriorityUpdated",
|
|
1102
|
+
"taskStatusUpdated",
|
|
1103
|
+
"taskAssigneeUpdated",
|
|
1104
|
+
"taskDueDateUpdated",
|
|
1105
|
+
"taskTagUpdated",
|
|
1106
|
+
"taskMoved",
|
|
1107
|
+
"taskCommentPosted",
|
|
1108
|
+
"taskCommentUpdated",
|
|
1109
|
+
"taskTimeEstimateUpdated",
|
|
1110
|
+
"taskTimeTrackedUpdated"
|
|
1111
|
+
];
|
|
1112
|
+
var TaskEventTriggerConfigurationSchema = z2.strictObject({ events: z2.array(z2.string()).nullable().optional() }).superRefine((configuration, context) => {
|
|
1113
|
+
const events = configuration.events ?? [];
|
|
1114
|
+
if (events.some((event) => !TaskEvents.includes(event)) || new Set(events).size !== events.length)
|
|
1115
|
+
context.addIssue({
|
|
1116
|
+
code: "custom",
|
|
1117
|
+
message: "ClickUp webhook events must be distinct supported task events"
|
|
1118
|
+
});
|
|
1119
|
+
});
|
|
1120
|
+
var tokenJSON = JSON;
|
|
1121
|
+
function decodeNumberTokens(text) {
|
|
1122
|
+
return JSON.parse(
|
|
1123
|
+
text,
|
|
1124
|
+
(_key, value, context) => typeof value === "number" && context?.source ? tokenJSON.rawJSON(context.source) : value
|
|
1125
|
+
);
|
|
1126
|
+
}
|
|
1127
|
+
function positiveUserId(value) {
|
|
1128
|
+
const text = flexibleIdentifier(value);
|
|
1129
|
+
if (!text) return void 0;
|
|
1130
|
+
if (!/^[+-]?\d+$/.test(text)) throw new TypeError("ClickUp user ID must be an integer");
|
|
1131
|
+
const number = BigInt(text);
|
|
1132
|
+
if (number < -(1n << 63n) || number >= 1n << 63n)
|
|
1133
|
+
throw new TypeError("ClickUp user ID is outside signed 64-bit range");
|
|
1134
|
+
if (number <= 0n) return void 0;
|
|
1135
|
+
return number <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(number) : tokenJSON.rawJSON(String(number));
|
|
1136
|
+
}
|
|
1137
|
+
var TaskHistoryItemSchema = z2.object({
|
|
1138
|
+
id: z2.string(),
|
|
1139
|
+
field: z2.string(),
|
|
1140
|
+
occurredAt: z2.string().optional(),
|
|
1141
|
+
userId: z2.union([
|
|
1142
|
+
z2.number().int().positive(),
|
|
1143
|
+
z2.custom(
|
|
1144
|
+
(value) => tokenJSON.isRawJSON(value) && /^[1-9]\d*$/.test(value.rawJSON) && BigInt(value.rawJSON) < 1n << 63n
|
|
1145
|
+
)
|
|
1146
|
+
]).optional(),
|
|
1147
|
+
parentId: z2.string().optional(),
|
|
1148
|
+
statusBefore: z2.string().optional(),
|
|
1149
|
+
statusAfter: z2.string().optional()
|
|
1150
|
+
});
|
|
1151
|
+
var TaskEventSchema = z2.object({
|
|
1152
|
+
eventId: z2.string(),
|
|
1153
|
+
webhookId: z2.string(),
|
|
1154
|
+
event: z2.string(),
|
|
1155
|
+
taskId: z2.string(),
|
|
1156
|
+
historyItems: z2.array(TaskHistoryItemSchema),
|
|
1157
|
+
occurredAt: z2.string()
|
|
1158
|
+
});
|
|
1159
|
+
var TaskEventTriggerDefinition = {
|
|
1160
|
+
trigger: { connectorId: ConnectorID, triggerName: "taskEvent" },
|
|
1161
|
+
description: "Receive one signed ClickUp task webhook event filtered by event name."
|
|
1162
|
+
};
|
|
1163
|
+
var UIUnitTaskEventPicker = "taskEventPicker";
|
|
1164
|
+
var UITaskEventPickerPortEvents = "events";
|
|
1165
|
+
function defineTaskEventTriggerBinding(config) {
|
|
1166
|
+
return mustTriggerBindingDefinition({ definition: TaskEventTriggerDefinition, ...config });
|
|
1167
|
+
}
|
|
1168
|
+
function newTaskEventTrigger(config) {
|
|
1169
|
+
if (config.connectionName !== config.connection.reference.name)
|
|
1170
|
+
throw new TypeError("ClickUp taskEvent connection name does not match its connection");
|
|
1171
|
+
const client = clickupClientOf(config.connection);
|
|
1172
|
+
const configuration = TaskEventTriggerConfigurationSchema.parse(config.configuration);
|
|
1173
|
+
const source = webhookEndpoint(client, config.connection.reference).newSource(
|
|
1174
|
+
(event) => !configuration.events?.length || configuration.events.includes(event.payload.event)
|
|
1175
|
+
);
|
|
1176
|
+
const definition = TaskEventTriggerDefinition;
|
|
1177
|
+
return newTrigger({
|
|
1178
|
+
definition,
|
|
1179
|
+
binding: {
|
|
1180
|
+
connection: config.connection.reference,
|
|
1181
|
+
trigger: definition.trigger,
|
|
1182
|
+
name: config.bindingName
|
|
1183
|
+
},
|
|
1184
|
+
source,
|
|
1185
|
+
target: config.target,
|
|
1186
|
+
logger: client.triggerLogger
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
function taskEventWebhookHandler(connection) {
|
|
1190
|
+
return webhookEndpoint(clickupClientOf(connection), connection.reference);
|
|
1191
|
+
}
|
|
1192
|
+
var TaskEventEndpointRunner = class {
|
|
1193
|
+
/** @internal Construct through newProjectTaskEventEndpointRunner. */
|
|
1194
|
+
constructor(endpoint, runners) {
|
|
1195
|
+
this.endpoint = endpoint;
|
|
1196
|
+
this.#runner = new WebhookEndpointRunner(endpoint, runners);
|
|
1197
|
+
}
|
|
1198
|
+
endpoint;
|
|
1199
|
+
#runner;
|
|
1200
|
+
/** Verify, record, and acknowledge one delivery, or answer 503 until pending events have replayed. */
|
|
1201
|
+
serveHTTP(request, response) {
|
|
1202
|
+
return this.#runner.serveHTTP(request, response);
|
|
1203
|
+
}
|
|
1204
|
+
/** Replay durable inboxes, then deliver new events until stopped. */
|
|
1205
|
+
run(context) {
|
|
1206
|
+
return this.#runner.run(context);
|
|
1207
|
+
}
|
|
1208
|
+
/** Number of bindings ready to receive. */
|
|
1209
|
+
runningSourceCount() {
|
|
1210
|
+
return this.endpoint.runningSourceCount();
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
function newProjectTaskEventEndpointRunner(project, connectionName, routes, options = {}) {
|
|
1214
|
+
if (routes.length === 0) throw new TypeError("ClickUp taskEvent routes are required");
|
|
1215
|
+
const connection = newProjectConnection2(project, connectionName, options);
|
|
1216
|
+
const client = clickupClientOf(connection);
|
|
1217
|
+
const triggerName = TaskEventTriggerDefinition.trigger.triggerName;
|
|
1218
|
+
const bindingNames = /* @__PURE__ */ new Set();
|
|
1219
|
+
const runners = routes.map((route) => {
|
|
1220
|
+
const bindingName = route.bindingName?.trim() ?? "";
|
|
1221
|
+
if (!bindingName || !route.target)
|
|
1222
|
+
throw new TypeError("ClickUp taskEvent binding name and target are required");
|
|
1223
|
+
if (bindingNames.has(bindingName))
|
|
1224
|
+
throw new TypeError(`ClickUp taskEvent binding name "${bindingName}" is duplicated`);
|
|
1225
|
+
bindingNames.add(bindingName);
|
|
1226
|
+
const key = { connectorId: ConnectorID, connectionName, triggerName, bindingName };
|
|
1227
|
+
const configuration = decodeTriggerConfiguration(
|
|
1228
|
+
project.configuration,
|
|
1229
|
+
key,
|
|
1230
|
+
TaskEventTriggerConfigurationSchema
|
|
1231
|
+
);
|
|
1232
|
+
const inbox = project.triggerInbox(key);
|
|
1233
|
+
const durable = newDurableTriggerTarget(inbox, key, route.target, {
|
|
1234
|
+
logger: client.triggerLogger,
|
|
1235
|
+
decodePayload(text) {
|
|
1236
|
+
return TaskEventSchema.parse(
|
|
1237
|
+
JSON.parse(
|
|
1238
|
+
text,
|
|
1239
|
+
(name, value, context) => name === "userId" && typeof value === "number" && context?.source ? positiveUserId(context.source) : value
|
|
1240
|
+
)
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
const target = {
|
|
1245
|
+
async prepareTrigger(context, event) {
|
|
1246
|
+
if (!event.payload.historyItems?.some((item) => tokenJSON.isRawJSON(item.userId))) {
|
|
1247
|
+
await durable.prepareTrigger(context, event);
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
context.signal.throwIfAborted();
|
|
1251
|
+
await inbox.add({
|
|
1252
|
+
id: event.id,
|
|
1253
|
+
event: Buffer.from(
|
|
1254
|
+
JSON.stringify({ eventId: event.id, occurredAt: event.occurredAt, payload: event.payload })
|
|
1255
|
+
)
|
|
1256
|
+
});
|
|
1257
|
+
},
|
|
1258
|
+
handleTrigger: (context, event) => durable.handleTrigger(context, event),
|
|
1259
|
+
replayTriggerDeliveries: (context) => durable.replayTriggerDeliveries(context)
|
|
1260
|
+
};
|
|
1261
|
+
return newTaskEventTrigger({ connection, connectionName, bindingName, configuration, target });
|
|
1262
|
+
});
|
|
1263
|
+
return new TaskEventEndpointRunner(webhookEndpoint(client, connection.reference), runners);
|
|
1264
|
+
}
|
|
1265
|
+
var endpoints = /* @__PURE__ */ new WeakMap();
|
|
1266
|
+
function webhookEndpoint(client, connection) {
|
|
1267
|
+
let byConnection = endpoints.get(client);
|
|
1268
|
+
if (!byConnection) {
|
|
1269
|
+
byConnection = /* @__PURE__ */ new Map();
|
|
1270
|
+
endpoints.set(client, byConnection);
|
|
1271
|
+
}
|
|
1272
|
+
const key = `${connection.provider}\0${connection.name}`;
|
|
1273
|
+
let endpoint = byConnection.get(key);
|
|
1274
|
+
if (!endpoint) {
|
|
1275
|
+
endpoint = new WebhookEndpoint({
|
|
1276
|
+
connectorId: ConnectorID,
|
|
1277
|
+
triggerName: "taskEvent",
|
|
1278
|
+
connection,
|
|
1279
|
+
credentials: client.credentials,
|
|
1280
|
+
maxBodyBytes: client.webhookMaxBodyBytes,
|
|
1281
|
+
verifyRequest,
|
|
1282
|
+
decodeEvent,
|
|
1283
|
+
now: client.triggerNow,
|
|
1284
|
+
logger: client.triggerLogger
|
|
1285
|
+
});
|
|
1286
|
+
byConnection.set(key, endpoint);
|
|
1287
|
+
}
|
|
1288
|
+
return endpoint;
|
|
1289
|
+
}
|
|
1290
|
+
function clickupClientOf(connection) {
|
|
1291
|
+
if (!(connection?.operations instanceof ClickUpClient))
|
|
1292
|
+
throw new TypeError("ClickUp Triggers require a ClickUpClient connection");
|
|
1293
|
+
return connection.operations;
|
|
1294
|
+
}
|
|
1295
|
+
async function verifyRequest(request, credentials) {
|
|
1296
|
+
const secret = credentials.webhookSecret?.reveal() ?? "";
|
|
1297
|
+
if (!secret) throw new WebhookVerificationUnavailableError();
|
|
1298
|
+
const header = request.headers["x-signature"];
|
|
1299
|
+
const signatureText = (Array.isArray(header) ? header[0] : header)?.trim() ?? "";
|
|
1300
|
+
if (!/^[0-9a-fA-F]{64}$/.test(signatureText)) throw new TypeError("invalid X-Signature");
|
|
1301
|
+
const expected = createHmac("sha256", secret).update(request.body).digest();
|
|
1302
|
+
if (!timingSafeEqual(Buffer.from(signatureText, "hex"), expected))
|
|
1303
|
+
throw new TypeError("X-Signature does not match the body");
|
|
1304
|
+
}
|
|
1305
|
+
function decodeEvent(request) {
|
|
1306
|
+
const wire = decodeNumberTokens(Buffer.from(request.body).toString("utf8"));
|
|
1307
|
+
if (!wire || typeof wire !== "object" || Array.isArray(wire))
|
|
1308
|
+
throw new TypeError("ClickUp webhook body is not a JSON object");
|
|
1309
|
+
const fields = wire;
|
|
1310
|
+
const event = fields.event;
|
|
1311
|
+
const webhookId = fields.webhook_id;
|
|
1312
|
+
if (typeof event !== "string" || !event || typeof webhookId !== "string" || !isPrintableIdentifier(webhookId))
|
|
1313
|
+
throw new TypeError("ClickUp webhook event has no event name or webhook_id");
|
|
1314
|
+
if (!TaskEvents.includes(event)) return void 0;
|
|
1315
|
+
const taskId = flexibleIdentifier(fields.task_id);
|
|
1316
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(taskId))
|
|
1317
|
+
throw new TypeError("ClickUp task event has no valid task_id");
|
|
1318
|
+
const rawHistory = fields.history_items;
|
|
1319
|
+
if (rawHistory != null && !Array.isArray(rawHistory))
|
|
1320
|
+
throw new TypeError("ClickUp history items are invalid");
|
|
1321
|
+
const historyItems = (rawHistory ?? []).slice(0, 20).map(decodeHistoryItem);
|
|
1322
|
+
const occurredAt = historyItems[0]?.occurredAt ?? goTimeJSON(request.receivedAt);
|
|
1323
|
+
const eventId = `${webhookId}:${event}:${historyItems[0]?.id ?? taskId}`;
|
|
1324
|
+
return {
|
|
1325
|
+
id: eventId,
|
|
1326
|
+
occurredAt: new Date(occurredAt),
|
|
1327
|
+
payload: { eventId, webhookId, event, taskId, historyItems, occurredAt }
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
function decodeHistoryItem(value) {
|
|
1331
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1332
|
+
throw new TypeError("ClickUp history item is invalid");
|
|
1333
|
+
const wire = value;
|
|
1334
|
+
const id = flexibleIdentifier(wire.id);
|
|
1335
|
+
if (!isPrintableIdentifier(id)) throw new TypeError("ClickUp history item has no valid id");
|
|
1336
|
+
if (wire.field != null && typeof wire.field !== "string")
|
|
1337
|
+
throw new TypeError("ClickUp history item field is invalid");
|
|
1338
|
+
const field = wire.field ?? "";
|
|
1339
|
+
const occurredAt = unixMilliseconds(wire.date);
|
|
1340
|
+
if (wire.user != null && (typeof wire.user !== "object" || Array.isArray(wire.user) || tokenJSON.isRawJSON(wire.user)))
|
|
1341
|
+
throw new TypeError("Invalid ClickUp history user");
|
|
1342
|
+
const user = wire.user ?? {};
|
|
1343
|
+
const userId = positiveUserId(user.id);
|
|
1344
|
+
const statusBefore = field === "status" ? statusName(wire.before) : "";
|
|
1345
|
+
const statusAfter = field === "status" ? statusName(wire.after) : "";
|
|
1346
|
+
return {
|
|
1347
|
+
id,
|
|
1348
|
+
field,
|
|
1349
|
+
...occurredAt ? { occurredAt } : {},
|
|
1350
|
+
...userId !== void 0 ? { userId } : {},
|
|
1351
|
+
...wire.parent_id != null ? { parentId: flexibleIdentifier(wire.parent_id) } : {},
|
|
1352
|
+
...statusBefore ? { statusBefore } : {},
|
|
1353
|
+
...statusAfter ? { statusAfter } : {}
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
function flexibleIdentifier(value) {
|
|
1357
|
+
if (value == null) return "";
|
|
1358
|
+
if (typeof value === "string") return value;
|
|
1359
|
+
if (tokenJSON.isRawJSON(value)) return value.rawJSON;
|
|
1360
|
+
if (typeof value === "number" && Number.isSafeInteger(value)) return String(value);
|
|
1361
|
+
throw new TypeError("ClickUp identifier is not a string or number");
|
|
1362
|
+
}
|
|
1363
|
+
function unixMilliseconds(value) {
|
|
1364
|
+
if (value == null || value === "") return void 0;
|
|
1365
|
+
const text = flexibleIdentifier(value);
|
|
1366
|
+
if (!/^\d+$/.test(text)) throw new TypeError("ClickUp time is not Unix milliseconds");
|
|
1367
|
+
const milliseconds2 = Number(text);
|
|
1368
|
+
if (!Number.isSafeInteger(milliseconds2)) throw new TypeError("ClickUp time is not Unix milliseconds");
|
|
1369
|
+
return milliseconds2 > 0 ? goTimeJSON(new Date(milliseconds2)) : void 0;
|
|
1370
|
+
}
|
|
1371
|
+
function goTimeJSON(value) {
|
|
1372
|
+
return value.toISOString().replace(/\.000Z$/, "Z");
|
|
1373
|
+
}
|
|
1374
|
+
function statusName(value) {
|
|
1375
|
+
return value && typeof value === "object" && !Array.isArray(value) && typeof value.status === "string" ? value.status : "";
|
|
1376
|
+
}
|
|
1377
|
+
function isPrintableIdentifier(value) {
|
|
1378
|
+
return value.length > 0 && Buffer.byteLength(value) <= 64 && /^[!-~]+$/.test(value) && !value.includes(":");
|
|
1379
|
+
}
|
|
1070
1380
|
export {
|
|
1071
1381
|
AddCommentBranch,
|
|
1072
1382
|
AddCommentBranchAdded,
|
|
@@ -1130,8 +1440,16 @@ export {
|
|
|
1130
1440
|
SearchTasksMetadata,
|
|
1131
1441
|
SearchTasksOperation,
|
|
1132
1442
|
SearchTasksOutputSchema,
|
|
1443
|
+
TaskEventEndpointRunner,
|
|
1444
|
+
TaskEventSchema,
|
|
1445
|
+
TaskEventTriggerConfigurationSchema,
|
|
1446
|
+
TaskEventTriggerDefinition,
|
|
1447
|
+
TaskEvents,
|
|
1448
|
+
TaskHistoryItemSchema,
|
|
1133
1449
|
TaskSchema,
|
|
1134
1450
|
TaskStatusSchema,
|
|
1451
|
+
UITaskEventPickerPortEvents,
|
|
1452
|
+
UIUnitTaskEventPicker,
|
|
1135
1453
|
UpdateTaskBranch,
|
|
1136
1454
|
UpdateTaskBranchDefect,
|
|
1137
1455
|
UpdateTaskBranchInvalidResponse,
|
|
@@ -1156,6 +1474,7 @@ export {
|
|
|
1156
1474
|
UpdateTaskTagsOutputSchema,
|
|
1157
1475
|
UserSchema,
|
|
1158
1476
|
decodeCredentials,
|
|
1477
|
+
defineTaskEventTriggerBinding,
|
|
1159
1478
|
isCredentialMaterialError,
|
|
1160
1479
|
newAddCommentStep,
|
|
1161
1480
|
newConnection,
|
|
@@ -1164,7 +1483,10 @@ export {
|
|
|
1164
1483
|
newFindMemberByEmailStep,
|
|
1165
1484
|
newGetTaskStep,
|
|
1166
1485
|
newProjectConnection2 as newProjectConnection,
|
|
1486
|
+
newProjectTaskEventEndpointRunner,
|
|
1167
1487
|
newSearchTasksStep,
|
|
1488
|
+
newTaskEventTrigger,
|
|
1168
1489
|
newUpdateTaskStep,
|
|
1169
|
-
newUpdateTaskTagsStep
|
|
1490
|
+
newUpdateTaskTagsStep,
|
|
1491
|
+
taskEventWebhookHandler
|
|
1170
1492
|
};
|
package/dist/mock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MockQuery, MockMutation, Case } from '@superdurable/connectors-sdk/connectormock';
|
|
2
2
|
import { Failure } from '@superdurable/connectors-sdk';
|
|
3
|
-
import { O as Operations, C as Connection, S as SearchTasksInput, d as SearchTasksOutput, G as GetTaskInput, T as Task, b as CreateTaskInput, c as CreateTaskOutput, U as UpdateTaskInput, e as UpdateTaskOutput, f as UpdateTaskTagsInput, g as UpdateTaskTagsOutput, A as AddCommentInput, a as AddCommentOutput, F as FindMemberByEmailInput, M as Member, q as CustomFieldInput, s as CustomFieldValue, B as TaskStatus, K as User } from './connection-
|
|
3
|
+
import { O as Operations, C as Connection, S as SearchTasksInput, d as SearchTasksOutput, G as GetTaskInput, T as Task, b as CreateTaskInput, c as CreateTaskOutput, U as UpdateTaskInput, e as UpdateTaskOutput, f as UpdateTaskTagsInput, g as UpdateTaskTagsOutput, A as AddCommentInput, a as AddCommentOutput, F as FindMemberByEmailInput, M as Member, q as CustomFieldInput, s as CustomFieldValue, B as TaskStatus, K as User } from './connection-CIEP4aiP.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
/** Go zero value for SearchTasksInput in scripted cases. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdurable/connector-clickup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "ClickUp task operations for Dex Flows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"test:integration": "npm run build && vitest run test/integration/*.integration.test.ts",
|
|
42
42
|
"check": "npm test && npm run typecheck && npm run lint",
|
|
43
43
|
"example:task": "npm run build && tsx examples/get-task/main.ts",
|
|
44
|
-
"example:task:start": "npm run build && tsx examples/get-task/start.ts"
|
|
44
|
+
"example:task:start": "npm run build && tsx examples/get-task/start.ts",
|
|
45
|
+
"example:event": "npm run build && tsx examples/task-event/main.ts"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"@superdurable/connectors-sdk": "0.12.0",
|