@superdurable/connector-clickup 0.1.2 → 0.1.3
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 +2 -2
- package/dex-connector.json +357 -9
- package/dist/{chunk-PAUZSKGN.js → chunk-PQCNNSDL.js} +35 -13
- package/dist/{connection-BB-IGLLD.d.ts → connection-CyZGpZRT.d.ts} +8 -2
- package/dist/index.d.ts +31 -19
- package/dist/index.js +282 -111
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, O as Operations, h as Config, i as Credentials } from './connection-
|
|
2
|
-
export { j as AddCommentInputSchema, k as AddCommentOutputSchema, l as ConfigSchema, m as CreateTaskInputSchema, n as CreateTaskOutputSchema, o as
|
|
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, O as Operations, h as Config, i as Credentials } from './connection-CyZGpZRT.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-CyZGpZRT.js';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
4
|
import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider, ReceiptDraft, Failure } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { StepTarget } from '@superdurable/dex';
|
|
@@ -77,7 +77,7 @@ declare const CreateTaskBranchCreated: "created";
|
|
|
77
77
|
declare const CreateTaskBranchNotFound: "notFound";
|
|
78
78
|
/** ClickUp conclusively rejected the task, such as an unknown status, assignee, or custom field value, or missing permission; nothing was created. */
|
|
79
79
|
declare const CreateTaskBranchProviderRejected: "providerRejected";
|
|
80
|
-
/**
|
|
80
|
+
/** 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. */
|
|
81
81
|
declare const CreateTaskBranchUncertain: "uncertain";
|
|
82
82
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
83
83
|
declare const CreateTaskBranchDefect: "defect";
|
|
@@ -103,7 +103,7 @@ declare const UpdateTaskBranchUpdated: "updated";
|
|
|
103
103
|
declare const UpdateTaskBranchNotFound: "notFound";
|
|
104
104
|
/** ClickUp conclusively rejected the change, such as a status that is not in the task's List or missing permission. */
|
|
105
105
|
declare const UpdateTaskBranchProviderRejected: "providerRejected";
|
|
106
|
-
/**
|
|
106
|
+
/** Kept for compatibility and no longer selected: the update is safe to repeat, so an invalid or oversized task after the update retries. */
|
|
107
107
|
declare const UpdateTaskBranchInvalidResponse: "invalidResponse";
|
|
108
108
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
109
109
|
declare const UpdateTaskBranchDefect: "defect";
|
|
@@ -129,7 +129,7 @@ declare const UpdateTaskTagsBranchUpdated: "updated";
|
|
|
129
129
|
declare const UpdateTaskTagsBranchNotFound: "notFound";
|
|
130
130
|
/** ClickUp conclusively rejected a tag change, such as missing permission; earlier changes in the same Step may have been applied. */
|
|
131
131
|
declare const UpdateTaskTagsBranchProviderRejected: "providerRejected";
|
|
132
|
-
/**
|
|
132
|
+
/** Kept for compatibility and no longer selected: the tag changes are safe to repeat, so an invalid or oversized task read back retries. */
|
|
133
133
|
declare const UpdateTaskTagsBranchInvalidResponse: "invalidResponse";
|
|
134
134
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
135
135
|
declare const UpdateTaskTagsBranchDefect: "defect";
|
|
@@ -155,7 +155,7 @@ declare const AddCommentBranchAdded: "added";
|
|
|
155
155
|
declare const AddCommentBranchNotFound: "notFound";
|
|
156
156
|
/** ClickUp conclusively rejected the comment, such as missing permission; nothing was added. */
|
|
157
157
|
declare const AddCommentBranchProviderRejected: "providerRejected";
|
|
158
|
-
/**
|
|
158
|
+
/** 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. */
|
|
159
159
|
declare const AddCommentBranchUncertain: "uncertain";
|
|
160
160
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
161
161
|
declare const AddCommentBranchDefect: "defect";
|
|
@@ -250,7 +250,7 @@ interface CreateTaskStepConfig<StepInput, OperationInput = CreateTaskInput, Oper
|
|
|
250
250
|
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
251
251
|
/** ClickUp conclusively rejected the task, such as an unknown status, assignee, or custom field value, or missing permission; nothing was created. */
|
|
252
252
|
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
253
|
-
/**
|
|
253
|
+
/** 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. */
|
|
254
254
|
uncertain?: StepTarget<MutationResult<OperationOutput>>;
|
|
255
255
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
256
256
|
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
@@ -271,10 +271,12 @@ interface UpdateTaskStepConfig<StepInput, OperationInput = UpdateTaskInput, Oper
|
|
|
271
271
|
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
272
272
|
/** ClickUp conclusively rejected the change, such as a status that is not in the task's List or missing permission. */
|
|
273
273
|
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
274
|
-
/**
|
|
274
|
+
/** Kept for compatibility and no longer selected: the update is safe to repeat, so an invalid or oversized task after the update retries. */
|
|
275
275
|
invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
|
|
276
276
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
277
277
|
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
278
|
+
/** Accepted for compatibility; ignored because the operation is safe to repeat. */
|
|
279
|
+
maxSends?: number;
|
|
278
280
|
}
|
|
279
281
|
/** Build the updateTask Step from a named connection. */
|
|
280
282
|
declare function newUpdateTaskStep<StepInput, OperationInput = UpdateTaskInput, OperationOutput = UpdateTaskOutput>(configuration: UpdateTaskStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
@@ -292,10 +294,12 @@ interface UpdateTaskTagsStepConfig<StepInput, OperationInput = UpdateTaskTagsInp
|
|
|
292
294
|
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
293
295
|
/** ClickUp conclusively rejected a tag change, such as missing permission; earlier changes in the same Step may have been applied. */
|
|
294
296
|
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
295
|
-
/**
|
|
297
|
+
/** Kept for compatibility and no longer selected: the tag changes are safe to repeat, so an invalid or oversized task read back retries. */
|
|
296
298
|
invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
|
|
297
299
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
298
300
|
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
301
|
+
/** Accepted for compatibility; ignored because the operation is safe to repeat. */
|
|
302
|
+
maxSends?: number;
|
|
299
303
|
}
|
|
300
304
|
/** Build the updateTaskTags Step from a named connection. */
|
|
301
305
|
declare function newUpdateTaskTagsStep<StepInput, OperationInput = UpdateTaskTagsInput, OperationOutput = UpdateTaskTagsOutput>(configuration: UpdateTaskTagsStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
@@ -313,7 +317,7 @@ interface AddCommentStepConfig<StepInput, OperationInput = AddCommentInput, Oper
|
|
|
313
317
|
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
314
318
|
/** ClickUp conclusively rejected the comment, such as missing permission; nothing was added. */
|
|
315
319
|
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
316
|
-
/**
|
|
320
|
+
/** 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. */
|
|
317
321
|
uncertain?: StepTarget<MutationResult<OperationOutput>>;
|
|
318
322
|
/** Local input, connection configuration, or connector definition is invalid. */
|
|
319
323
|
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
@@ -373,7 +377,7 @@ declare class FindMemberByEmailOperation implements Query<FindMemberByEmailInput
|
|
|
373
377
|
declare class UpdateTaskOperation implements Mutation<UpdateTaskInput, UpdateTaskOutput> {
|
|
374
378
|
private readonly client;
|
|
375
379
|
/** Bind a client. */ constructor(client: ClickUpClient);
|
|
376
|
-
/** Return the generated definition. */ definition():
|
|
380
|
+
/** Return the generated definition. */ definition(): MutationDefinition;
|
|
377
381
|
/** Correlate this mutation with the Dex Call ID. */ idempotencyKey(callId: string): string;
|
|
378
382
|
/** Validate, update, and decode the task. */
|
|
379
383
|
invoke(call: Call, input: UpdateTaskInput): Promise<MutationAttempt<UpdateTaskOutput>>;
|
|
@@ -382,29 +386,31 @@ declare class UpdateTaskOperation implements Mutation<UpdateTaskInput, UpdateTas
|
|
|
382
386
|
declare class UpdateTaskTagsOperation implements Mutation<UpdateTaskTagsInput, UpdateTaskTagsOutput> {
|
|
383
387
|
private readonly client;
|
|
384
388
|
/** Bind a client. */ constructor(client: ClickUpClient);
|
|
385
|
-
/** Return the generated definition. */ definition():
|
|
389
|
+
/** Return the generated definition. */ definition(): MutationDefinition;
|
|
386
390
|
/** Correlate this mutation with the Dex Call ID. */ idempotencyKey(callId: string): string;
|
|
387
391
|
/** Apply repeat safe tag membership changes. */
|
|
388
392
|
invoke(call: Call, input: UpdateTaskTagsInput): Promise<MutationAttempt<UpdateTaskTagsOutput>>;
|
|
389
393
|
}
|
|
390
|
-
/** Create one task
|
|
394
|
+
/** Create one task behind the single-dispatch fence, reading back an unknown earlier send and resending only within the send cap. */
|
|
391
395
|
declare class CreateTaskOperation implements Mutation<CreateTaskInput, CreateTaskOutput> {
|
|
392
396
|
private readonly client;
|
|
393
397
|
/** Bind a client. */ constructor(client: ClickUpClient);
|
|
394
|
-
/** Return the generated definition. */ definition():
|
|
398
|
+
/** Return the generated definition. */ definition(): MutationDefinition;
|
|
395
399
|
/** Correlate the checkpoint with the Dex Call ID. */ idempotencyKey(callId: string): string;
|
|
396
|
-
/** Create or
|
|
400
|
+
/** Create, read back, or resend one task. */
|
|
397
401
|
invoke(call: Call, input: CreateTaskInput): Promise<MutationAttempt<CreateTaskOutput>>;
|
|
402
|
+
/** Never send; return undefined when read-back confirmed nothing and the fence permits a resend. */
|
|
398
403
|
private reconcile;
|
|
399
404
|
}
|
|
400
|
-
/** Add one comment
|
|
405
|
+
/** Add one comment behind the single-dispatch fence, reading back an unknown earlier send and resending only within the send cap. */
|
|
401
406
|
declare class AddCommentOperation implements Mutation<AddCommentInput, AddCommentOutput> {
|
|
402
407
|
private readonly client;
|
|
403
408
|
/** Bind a client. */ constructor(client: ClickUpClient);
|
|
404
|
-
/** Return the generated definition. */ definition():
|
|
409
|
+
/** Return the generated definition. */ definition(): MutationDefinition;
|
|
405
410
|
/** Correlate the checkpoint with the Dex Call ID. */ idempotencyKey(callId: string): string;
|
|
406
|
-
/** Add or
|
|
411
|
+
/** Add, read back, or resend one comment. */
|
|
407
412
|
invoke(call: Call, input: AddCommentInput): Promise<MutationAttempt<AddCommentOutput>>;
|
|
413
|
+
/** Never send; return undefined when read-back confirmed nothing and the fence permits a resend. */
|
|
408
414
|
private reconcile;
|
|
409
415
|
}
|
|
410
416
|
|
|
@@ -419,7 +425,10 @@ interface ClickUpClientOptions {
|
|
|
419
425
|
/** Override only with a ClickUp compatible test endpoint. */
|
|
420
426
|
apiBaseURL?: string;
|
|
421
427
|
}
|
|
422
|
-
/**
|
|
428
|
+
/**
|
|
429
|
+
* Outcome of one ClickUp HTTP exchange; `status` is the HTTP status of a response without a usable body, or 0.
|
|
430
|
+
* `isErrorBodyTooLarge` marks a non-2xx body over maxResponseBytes, which cannot prove a write refusal.
|
|
431
|
+
*/
|
|
423
432
|
type Exchange = {
|
|
424
433
|
kind: 'succeeded';
|
|
425
434
|
response: ProviderResponse;
|
|
@@ -427,6 +436,8 @@ type Exchange = {
|
|
|
427
436
|
kind: 'notFound' | 'notSent' | 'rateLimited' | 'unconfirmed' | 'rejected' | 'invalid' | 'defect';
|
|
428
437
|
failure: Failure;
|
|
429
438
|
retryAfterMs: number;
|
|
439
|
+
status: number;
|
|
440
|
+
isErrorBodyTooLarge?: boolean;
|
|
430
441
|
};
|
|
431
442
|
/** Authenticated ClickUp API client; credentials are resolved for each request. */
|
|
432
443
|
declare class ClickUpClient {
|
|
@@ -450,6 +461,7 @@ declare class ClickUpClient {
|
|
|
450
461
|
currentTime(): Date;
|
|
451
462
|
/** Send a bounded API request and classify its response; signal can bound a multi-request operation. */
|
|
452
463
|
exchange(call: Call, operation: string, method: string, path: string, query?: URLSearchParams, payload?: unknown, signal?: AbortSignal): Promise<Exchange>;
|
|
464
|
+
private classifyFailureStatus;
|
|
453
465
|
private rateLimitDelay;
|
|
454
466
|
private outcome;
|
|
455
467
|
}
|