@perspectask/sdk 0.0.3 → 0.0.5
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 +9 -0
- package/dist/index.cjs +189 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +221 -5
- package/dist/index.d.ts +221 -5
- package/dist/index.js +167 -1
- package/dist/index.js.map +1 -1
- package/package.json +15 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
|
|
1
3
|
type AuthToken = string | undefined;
|
|
2
4
|
interface Auth {
|
|
3
5
|
/**
|
|
@@ -316,6 +318,9 @@ type ClientOptions = {
|
|
|
316
318
|
baseUrl: 'https://api.perspectask.com/v1' | (string & {});
|
|
317
319
|
};
|
|
318
320
|
type Task = {
|
|
321
|
+
/**
|
|
322
|
+
* Short id: the minimum unique prefix of the task UUID (e.g. "a3f"). Accepted anywhere an id is.
|
|
323
|
+
*/
|
|
319
324
|
id?: string;
|
|
320
325
|
title?: string;
|
|
321
326
|
description?: string;
|
|
@@ -331,7 +336,7 @@ type Task = {
|
|
|
331
336
|
* The actual end-of-period timestamp (e.g. Sunday 23:59:59 for a weekly task). Omitted for lifetime tasks and tasks without a schedule.
|
|
332
337
|
*/
|
|
333
338
|
deadline_date?: string;
|
|
334
|
-
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING';
|
|
339
|
+
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING' | 'DELEGATED';
|
|
335
340
|
/**
|
|
336
341
|
* Percentage complete (e.g. "52%"), computed recursively over the ENTIRE subtree — children, their children, and so on to the leaves — not just direct children. PerspecTask maintains this automatically so the user sees true progress at a glance. It can read 100% when every descendant is completed even if this task itself is not yet checked. Conversely, if this task is itself marked completed, its completion is forced to 100% regardless of any unfinished descendants (the task-level status overrides the rollup). Only present when the task has children.
|
|
337
342
|
*/
|
|
@@ -345,6 +350,10 @@ type Task = {
|
|
|
345
350
|
* When the task was created. Omitted by default. Present only when requested: `?showCreated=true` returns a relative time (e.g. "5 minutes ago"), `?showCreatedDate=true` returns an absolute ISO 8601 timestamp.
|
|
346
351
|
*/
|
|
347
352
|
created?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Tasks that should be done before this one (short ids), set with `block` / `removeBlock` on update. Just a flag, nothing is enforced. Only present when the task is blocked.
|
|
355
|
+
*/
|
|
356
|
+
blocked_by?: Array<string>;
|
|
348
357
|
children?: Array<string | Task>;
|
|
349
358
|
parents?: Array<string>;
|
|
350
359
|
};
|
|
@@ -353,7 +362,7 @@ type ListTasksData = {
|
|
|
353
362
|
path?: never;
|
|
354
363
|
query?: {
|
|
355
364
|
/**
|
|
356
|
-
* Defaults to false
|
|
365
|
+
* Defaults to false. In tree mode, encrypted tasks are pruned UNLESS they lie on the path to an unencrypted task — so an encrypted parent of a readable task is kept (with `encrypted: true` and no title/description keys) to preserve structure, while fully-encrypted branches are hidden. In flat mode, encrypted tasks are simply omitted. Set to true to include ALL end-to-end-encrypted tasks for full visibility.
|
|
357
366
|
*/
|
|
358
367
|
includeEncrypted?: boolean;
|
|
359
368
|
/**
|
|
@@ -372,6 +381,10 @@ type ListTasksData = {
|
|
|
372
381
|
* Defaults to false. Set to true to include `created` as an absolute ISO 8601 timestamp. Takes precedence over `showCreated` when both are set.
|
|
373
382
|
*/
|
|
374
383
|
showCreatedDate?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Defaults to false. By default the list omits done tasks (status COMPLETED and CANCELLED) so an agent sees only open work and to save context. Set to true to include all completed and cancelled tasks. Exception in tree mode: a completed task is kept if any of its descendants is still open — this preserves the path/context to that open task even when showCompleted is false.
|
|
386
|
+
*/
|
|
387
|
+
showCompleted?: boolean;
|
|
375
388
|
};
|
|
376
389
|
url: '/tasks';
|
|
377
390
|
};
|
|
@@ -417,9 +430,17 @@ type GetTaskData = {
|
|
|
417
430
|
};
|
|
418
431
|
query?: {
|
|
419
432
|
/**
|
|
420
|
-
* Defaults to false.
|
|
433
|
+
* Defaults to false. In tree mode, encrypted descendants are pruned unless they lie on the path to an unencrypted task (so you see the structure leading to a task you can read). Set to true to keep ALL encrypted tasks in the subtree (returned with `encrypted: true` and no title/description keys). The requested task itself is always returned regardless.
|
|
434
|
+
*/
|
|
435
|
+
includeEncrypted?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Defaults to false. When true, this task's `children` are returned as full nested task objects (recursively) instead of id strings. A task that was already expanded elsewhere in the subtree will not be expanded again — only its short id string will appear in subsequent parents' `children`, preserving the relationship without repeating the full object.
|
|
421
438
|
*/
|
|
422
439
|
tree?: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Like `tree` but without deduplication: a task with multiple parents appears under each parent. Mutually exclusive with `tree`.
|
|
442
|
+
*/
|
|
443
|
+
treeFull?: boolean;
|
|
423
444
|
/**
|
|
424
445
|
* Defaults to false. Set to true to include `created` as a human-friendly relative time (e.g. "5 minutes ago"). Ignored when `showCreatedDate` is true.
|
|
425
446
|
*/
|
|
@@ -428,6 +449,10 @@ type GetTaskData = {
|
|
|
428
449
|
* Defaults to false. Set to true to include `created` as an absolute ISO 8601 timestamp. Takes precedence over `showCreated` when both are set.
|
|
429
450
|
*/
|
|
430
451
|
showCreatedDate?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Defaults to false. By default completed and cancelled subtasks are pruned from the tree. Exception: a completed task is kept if any of its descendants is still open (to preserve context/path). Set to true to include all completed and cancelled tasks regardless.
|
|
454
|
+
*/
|
|
455
|
+
showCompleted?: boolean;
|
|
431
456
|
};
|
|
432
457
|
url: '/tasks/{id}';
|
|
433
458
|
};
|
|
@@ -452,7 +477,7 @@ type UpdateTaskData = {
|
|
|
452
477
|
* When this task is due — same shorthand grammar as on create (today, lifetime, q-2-2026, q2, d-20-11, …).
|
|
453
478
|
*/
|
|
454
479
|
deadline?: string;
|
|
455
|
-
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING';
|
|
480
|
+
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING' | 'DELEGATED';
|
|
456
481
|
priority?: 0 | 1 | 2 | 3;
|
|
457
482
|
/**
|
|
458
483
|
* Attach this task as a child of the given parent (full UUID or short id prefix).
|
|
@@ -470,6 +495,14 @@ type UpdateTaskData = {
|
|
|
470
495
|
* When replacing among multiple parents, the existing parent to replace (full UUID or short id prefix; used with `replace_parent`).
|
|
471
496
|
*/
|
|
472
497
|
replace_parent_from?: string;
|
|
498
|
+
/**
|
|
499
|
+
* Mark the given task as blocking this one — it should be done first (full UUID or short id prefix). Just a flag; nothing is enforced.
|
|
500
|
+
*/
|
|
501
|
+
block?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Remove the given task from this task’s "blocked by" list (full UUID or short id prefix).
|
|
504
|
+
*/
|
|
505
|
+
removeBlock?: string;
|
|
473
506
|
};
|
|
474
507
|
path: {
|
|
475
508
|
id: string;
|
|
@@ -523,6 +556,189 @@ declare class Tasks {
|
|
|
523
556
|
static updateTask<ThrowOnError extends boolean = false>(options: Options<UpdateTaskData, ThrowOnError>): RequestResult<UpdateTaskResponses, UpdateTaskErrors, ThrowOnError, "fields">;
|
|
524
557
|
}
|
|
525
558
|
|
|
559
|
+
declare const zTask: z.ZodMiniObject<{
|
|
560
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
561
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
562
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
563
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
564
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
565
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
566
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
567
|
+
ACTIVE: "ACTIVE";
|
|
568
|
+
COMPLETED: "COMPLETED";
|
|
569
|
+
CANCELLED: "CANCELLED";
|
|
570
|
+
READY: "READY";
|
|
571
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
572
|
+
WAITING: "WAITING";
|
|
573
|
+
DELEGATED: "DELEGATED";
|
|
574
|
+
}>>;
|
|
575
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
576
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
577
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
578
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
579
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
580
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
581
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
declare const zListTasksQuery: z.ZodMiniObject<{
|
|
584
|
+
includeEncrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
585
|
+
tree: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
586
|
+
treeFull: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
587
|
+
showCreated: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
588
|
+
showCreatedDate: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
589
|
+
showCompleted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
/**
|
|
592
|
+
* List of tasks
|
|
593
|
+
*/
|
|
594
|
+
declare const zListTasksResponse: z.ZodMiniArray<z.ZodMiniObject<{
|
|
595
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
596
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
597
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
598
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
599
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
600
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
601
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
602
|
+
ACTIVE: "ACTIVE";
|
|
603
|
+
COMPLETED: "COMPLETED";
|
|
604
|
+
CANCELLED: "CANCELLED";
|
|
605
|
+
READY: "READY";
|
|
606
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
607
|
+
WAITING: "WAITING";
|
|
608
|
+
DELEGATED: "DELEGATED";
|
|
609
|
+
}>>;
|
|
610
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
611
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
612
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
613
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
614
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
615
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
616
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
617
|
+
}, z.core.$strip>>;
|
|
618
|
+
declare const zCreateTaskBody: z.ZodMiniObject<{
|
|
619
|
+
title: z.ZodMiniString<string>;
|
|
620
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
621
|
+
priority: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<0>, z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>;
|
|
622
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
623
|
+
parent_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
624
|
+
}, z.core.$strip>;
|
|
625
|
+
/**
|
|
626
|
+
* Created
|
|
627
|
+
*/
|
|
628
|
+
declare const zCreateTaskResponse: z.ZodMiniObject<{
|
|
629
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
630
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
631
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
632
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
633
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
634
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
635
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
636
|
+
ACTIVE: "ACTIVE";
|
|
637
|
+
COMPLETED: "COMPLETED";
|
|
638
|
+
CANCELLED: "CANCELLED";
|
|
639
|
+
READY: "READY";
|
|
640
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
641
|
+
WAITING: "WAITING";
|
|
642
|
+
DELEGATED: "DELEGATED";
|
|
643
|
+
}>>;
|
|
644
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
645
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
646
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
647
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
648
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
649
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
650
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
651
|
+
}, z.core.$strip>;
|
|
652
|
+
declare const zGetTaskPath: z.ZodMiniObject<{
|
|
653
|
+
id: z.ZodMiniString<string>;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
declare const zGetTaskQuery: z.ZodMiniObject<{
|
|
656
|
+
includeEncrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
657
|
+
tree: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
658
|
+
treeFull: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
659
|
+
showCreated: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
660
|
+
showCreatedDate: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
661
|
+
showCompleted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
662
|
+
}, z.core.$strip>;
|
|
663
|
+
/**
|
|
664
|
+
* A task
|
|
665
|
+
*/
|
|
666
|
+
declare const zGetTaskResponse: z.ZodMiniObject<{
|
|
667
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
668
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
669
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
670
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
671
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
672
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
673
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
674
|
+
ACTIVE: "ACTIVE";
|
|
675
|
+
COMPLETED: "COMPLETED";
|
|
676
|
+
CANCELLED: "CANCELLED";
|
|
677
|
+
READY: "READY";
|
|
678
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
679
|
+
WAITING: "WAITING";
|
|
680
|
+
DELEGATED: "DELEGATED";
|
|
681
|
+
}>>;
|
|
682
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
683
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
684
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
685
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
686
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
687
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
688
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
declare const zUpdateTaskBody: z.ZodMiniObject<{
|
|
691
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
692
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
693
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
694
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
695
|
+
ACTIVE: "ACTIVE";
|
|
696
|
+
COMPLETED: "COMPLETED";
|
|
697
|
+
CANCELLED: "CANCELLED";
|
|
698
|
+
READY: "READY";
|
|
699
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
700
|
+
WAITING: "WAITING";
|
|
701
|
+
DELEGATED: "DELEGATED";
|
|
702
|
+
}>>;
|
|
703
|
+
priority: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<0>, z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>;
|
|
704
|
+
add_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
705
|
+
remove_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
706
|
+
replace_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
707
|
+
replace_parent_from: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
708
|
+
block: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
709
|
+
removeBlock: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
710
|
+
}, z.core.$strip>;
|
|
711
|
+
declare const zUpdateTaskPath: z.ZodMiniObject<{
|
|
712
|
+
id: z.ZodMiniString<string>;
|
|
713
|
+
}, z.core.$strip>;
|
|
714
|
+
/**
|
|
715
|
+
* Updated
|
|
716
|
+
*/
|
|
717
|
+
declare const zUpdateTaskResponse: z.ZodMiniObject<{
|
|
718
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
719
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
720
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
721
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
722
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
723
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
724
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
725
|
+
ACTIVE: "ACTIVE";
|
|
726
|
+
COMPLETED: "COMPLETED";
|
|
727
|
+
CANCELLED: "CANCELLED";
|
|
728
|
+
READY: "READY";
|
|
729
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
730
|
+
WAITING: "WAITING";
|
|
731
|
+
DELEGATED: "DELEGATED";
|
|
732
|
+
}>>;
|
|
733
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
734
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
735
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
736
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
737
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
738
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
739
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
|
|
526
742
|
interface PerspecTaskOptions {
|
|
527
743
|
/**
|
|
528
744
|
* Your PerspecTask API key (begins with `pt_live_`). Create one in the web
|
|
@@ -607,4 +823,4 @@ declare function createTasksNamespace(client: Client): {
|
|
|
607
823
|
}>;
|
|
608
824
|
};
|
|
609
825
|
|
|
610
|
-
export { type ClientOptions, type CreateTaskData, type CreateTaskResponse, type CreateTaskResponses, type GetTaskData, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type ListTasksData, type ListTasksResponse, type ListTasksResponses, type Options, PerspecTask, type PerspecTaskOptions, type Task, Tasks, type UpdateTaskData, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, PerspecTask as default };
|
|
826
|
+
export { type ClientOptions, type CreateTaskData, type CreateTaskResponse, type CreateTaskResponses, type GetTaskData, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type ListTasksData, type ListTasksResponse, type ListTasksResponses, type Options, PerspecTask, type PerspecTaskOptions, type Task, Tasks, type UpdateTaskData, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, PerspecTask as default, zCreateTaskBody, zCreateTaskResponse, zGetTaskPath, zGetTaskQuery, zGetTaskResponse, zListTasksQuery, zListTasksResponse, zTask, zUpdateTaskBody, zUpdateTaskPath, zUpdateTaskResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
|
|
1
3
|
type AuthToken = string | undefined;
|
|
2
4
|
interface Auth {
|
|
3
5
|
/**
|
|
@@ -316,6 +318,9 @@ type ClientOptions = {
|
|
|
316
318
|
baseUrl: 'https://api.perspectask.com/v1' | (string & {});
|
|
317
319
|
};
|
|
318
320
|
type Task = {
|
|
321
|
+
/**
|
|
322
|
+
* Short id: the minimum unique prefix of the task UUID (e.g. "a3f"). Accepted anywhere an id is.
|
|
323
|
+
*/
|
|
319
324
|
id?: string;
|
|
320
325
|
title?: string;
|
|
321
326
|
description?: string;
|
|
@@ -331,7 +336,7 @@ type Task = {
|
|
|
331
336
|
* The actual end-of-period timestamp (e.g. Sunday 23:59:59 for a weekly task). Omitted for lifetime tasks and tasks without a schedule.
|
|
332
337
|
*/
|
|
333
338
|
deadline_date?: string;
|
|
334
|
-
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING';
|
|
339
|
+
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING' | 'DELEGATED';
|
|
335
340
|
/**
|
|
336
341
|
* Percentage complete (e.g. "52%"), computed recursively over the ENTIRE subtree — children, their children, and so on to the leaves — not just direct children. PerspecTask maintains this automatically so the user sees true progress at a glance. It can read 100% when every descendant is completed even if this task itself is not yet checked. Conversely, if this task is itself marked completed, its completion is forced to 100% regardless of any unfinished descendants (the task-level status overrides the rollup). Only present when the task has children.
|
|
337
342
|
*/
|
|
@@ -345,6 +350,10 @@ type Task = {
|
|
|
345
350
|
* When the task was created. Omitted by default. Present only when requested: `?showCreated=true` returns a relative time (e.g. "5 minutes ago"), `?showCreatedDate=true` returns an absolute ISO 8601 timestamp.
|
|
346
351
|
*/
|
|
347
352
|
created?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Tasks that should be done before this one (short ids), set with `block` / `removeBlock` on update. Just a flag, nothing is enforced. Only present when the task is blocked.
|
|
355
|
+
*/
|
|
356
|
+
blocked_by?: Array<string>;
|
|
348
357
|
children?: Array<string | Task>;
|
|
349
358
|
parents?: Array<string>;
|
|
350
359
|
};
|
|
@@ -353,7 +362,7 @@ type ListTasksData = {
|
|
|
353
362
|
path?: never;
|
|
354
363
|
query?: {
|
|
355
364
|
/**
|
|
356
|
-
* Defaults to false
|
|
365
|
+
* Defaults to false. In tree mode, encrypted tasks are pruned UNLESS they lie on the path to an unencrypted task — so an encrypted parent of a readable task is kept (with `encrypted: true` and no title/description keys) to preserve structure, while fully-encrypted branches are hidden. In flat mode, encrypted tasks are simply omitted. Set to true to include ALL end-to-end-encrypted tasks for full visibility.
|
|
357
366
|
*/
|
|
358
367
|
includeEncrypted?: boolean;
|
|
359
368
|
/**
|
|
@@ -372,6 +381,10 @@ type ListTasksData = {
|
|
|
372
381
|
* Defaults to false. Set to true to include `created` as an absolute ISO 8601 timestamp. Takes precedence over `showCreated` when both are set.
|
|
373
382
|
*/
|
|
374
383
|
showCreatedDate?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Defaults to false. By default the list omits done tasks (status COMPLETED and CANCELLED) so an agent sees only open work and to save context. Set to true to include all completed and cancelled tasks. Exception in tree mode: a completed task is kept if any of its descendants is still open — this preserves the path/context to that open task even when showCompleted is false.
|
|
386
|
+
*/
|
|
387
|
+
showCompleted?: boolean;
|
|
375
388
|
};
|
|
376
389
|
url: '/tasks';
|
|
377
390
|
};
|
|
@@ -417,9 +430,17 @@ type GetTaskData = {
|
|
|
417
430
|
};
|
|
418
431
|
query?: {
|
|
419
432
|
/**
|
|
420
|
-
* Defaults to false.
|
|
433
|
+
* Defaults to false. In tree mode, encrypted descendants are pruned unless they lie on the path to an unencrypted task (so you see the structure leading to a task you can read). Set to true to keep ALL encrypted tasks in the subtree (returned with `encrypted: true` and no title/description keys). The requested task itself is always returned regardless.
|
|
434
|
+
*/
|
|
435
|
+
includeEncrypted?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Defaults to false. When true, this task's `children` are returned as full nested task objects (recursively) instead of id strings. A task that was already expanded elsewhere in the subtree will not be expanded again — only its short id string will appear in subsequent parents' `children`, preserving the relationship without repeating the full object.
|
|
421
438
|
*/
|
|
422
439
|
tree?: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Like `tree` but without deduplication: a task with multiple parents appears under each parent. Mutually exclusive with `tree`.
|
|
442
|
+
*/
|
|
443
|
+
treeFull?: boolean;
|
|
423
444
|
/**
|
|
424
445
|
* Defaults to false. Set to true to include `created` as a human-friendly relative time (e.g. "5 minutes ago"). Ignored when `showCreatedDate` is true.
|
|
425
446
|
*/
|
|
@@ -428,6 +449,10 @@ type GetTaskData = {
|
|
|
428
449
|
* Defaults to false. Set to true to include `created` as an absolute ISO 8601 timestamp. Takes precedence over `showCreated` when both are set.
|
|
429
450
|
*/
|
|
430
451
|
showCreatedDate?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Defaults to false. By default completed and cancelled subtasks are pruned from the tree. Exception: a completed task is kept if any of its descendants is still open (to preserve context/path). Set to true to include all completed and cancelled tasks regardless.
|
|
454
|
+
*/
|
|
455
|
+
showCompleted?: boolean;
|
|
431
456
|
};
|
|
432
457
|
url: '/tasks/{id}';
|
|
433
458
|
};
|
|
@@ -452,7 +477,7 @@ type UpdateTaskData = {
|
|
|
452
477
|
* When this task is due — same shorthand grammar as on create (today, lifetime, q-2-2026, q2, d-20-11, …).
|
|
453
478
|
*/
|
|
454
479
|
deadline?: string;
|
|
455
|
-
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING';
|
|
480
|
+
status?: 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'READY' | 'IN_PROGRESS' | 'WAITING' | 'DELEGATED';
|
|
456
481
|
priority?: 0 | 1 | 2 | 3;
|
|
457
482
|
/**
|
|
458
483
|
* Attach this task as a child of the given parent (full UUID or short id prefix).
|
|
@@ -470,6 +495,14 @@ type UpdateTaskData = {
|
|
|
470
495
|
* When replacing among multiple parents, the existing parent to replace (full UUID or short id prefix; used with `replace_parent`).
|
|
471
496
|
*/
|
|
472
497
|
replace_parent_from?: string;
|
|
498
|
+
/**
|
|
499
|
+
* Mark the given task as blocking this one — it should be done first (full UUID or short id prefix). Just a flag; nothing is enforced.
|
|
500
|
+
*/
|
|
501
|
+
block?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Remove the given task from this task’s "blocked by" list (full UUID or short id prefix).
|
|
504
|
+
*/
|
|
505
|
+
removeBlock?: string;
|
|
473
506
|
};
|
|
474
507
|
path: {
|
|
475
508
|
id: string;
|
|
@@ -523,6 +556,189 @@ declare class Tasks {
|
|
|
523
556
|
static updateTask<ThrowOnError extends boolean = false>(options: Options<UpdateTaskData, ThrowOnError>): RequestResult<UpdateTaskResponses, UpdateTaskErrors, ThrowOnError, "fields">;
|
|
524
557
|
}
|
|
525
558
|
|
|
559
|
+
declare const zTask: z.ZodMiniObject<{
|
|
560
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
561
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
562
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
563
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
564
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
565
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
566
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
567
|
+
ACTIVE: "ACTIVE";
|
|
568
|
+
COMPLETED: "COMPLETED";
|
|
569
|
+
CANCELLED: "CANCELLED";
|
|
570
|
+
READY: "READY";
|
|
571
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
572
|
+
WAITING: "WAITING";
|
|
573
|
+
DELEGATED: "DELEGATED";
|
|
574
|
+
}>>;
|
|
575
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
576
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
577
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
578
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
579
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
580
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
581
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
declare const zListTasksQuery: z.ZodMiniObject<{
|
|
584
|
+
includeEncrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
585
|
+
tree: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
586
|
+
treeFull: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
587
|
+
showCreated: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
588
|
+
showCreatedDate: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
589
|
+
showCompleted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
/**
|
|
592
|
+
* List of tasks
|
|
593
|
+
*/
|
|
594
|
+
declare const zListTasksResponse: z.ZodMiniArray<z.ZodMiniObject<{
|
|
595
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
596
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
597
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
598
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
599
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
600
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
601
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
602
|
+
ACTIVE: "ACTIVE";
|
|
603
|
+
COMPLETED: "COMPLETED";
|
|
604
|
+
CANCELLED: "CANCELLED";
|
|
605
|
+
READY: "READY";
|
|
606
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
607
|
+
WAITING: "WAITING";
|
|
608
|
+
DELEGATED: "DELEGATED";
|
|
609
|
+
}>>;
|
|
610
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
611
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
612
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
613
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
614
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
615
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
616
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
617
|
+
}, z.core.$strip>>;
|
|
618
|
+
declare const zCreateTaskBody: z.ZodMiniObject<{
|
|
619
|
+
title: z.ZodMiniString<string>;
|
|
620
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
621
|
+
priority: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<0>, z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>;
|
|
622
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
623
|
+
parent_id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
624
|
+
}, z.core.$strip>;
|
|
625
|
+
/**
|
|
626
|
+
* Created
|
|
627
|
+
*/
|
|
628
|
+
declare const zCreateTaskResponse: z.ZodMiniObject<{
|
|
629
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
630
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
631
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
632
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
633
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
634
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
635
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
636
|
+
ACTIVE: "ACTIVE";
|
|
637
|
+
COMPLETED: "COMPLETED";
|
|
638
|
+
CANCELLED: "CANCELLED";
|
|
639
|
+
READY: "READY";
|
|
640
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
641
|
+
WAITING: "WAITING";
|
|
642
|
+
DELEGATED: "DELEGATED";
|
|
643
|
+
}>>;
|
|
644
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
645
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
646
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
647
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
648
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
649
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
650
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
651
|
+
}, z.core.$strip>;
|
|
652
|
+
declare const zGetTaskPath: z.ZodMiniObject<{
|
|
653
|
+
id: z.ZodMiniString<string>;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
declare const zGetTaskQuery: z.ZodMiniObject<{
|
|
656
|
+
includeEncrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
657
|
+
tree: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
658
|
+
treeFull: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
659
|
+
showCreated: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
660
|
+
showCreatedDate: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
661
|
+
showCompleted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
662
|
+
}, z.core.$strip>;
|
|
663
|
+
/**
|
|
664
|
+
* A task
|
|
665
|
+
*/
|
|
666
|
+
declare const zGetTaskResponse: z.ZodMiniObject<{
|
|
667
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
668
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
669
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
670
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
671
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
672
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
673
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
674
|
+
ACTIVE: "ACTIVE";
|
|
675
|
+
COMPLETED: "COMPLETED";
|
|
676
|
+
CANCELLED: "CANCELLED";
|
|
677
|
+
READY: "READY";
|
|
678
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
679
|
+
WAITING: "WAITING";
|
|
680
|
+
DELEGATED: "DELEGATED";
|
|
681
|
+
}>>;
|
|
682
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
683
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
684
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
685
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
686
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
687
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
688
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
declare const zUpdateTaskBody: z.ZodMiniObject<{
|
|
691
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
692
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
693
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
694
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
695
|
+
ACTIVE: "ACTIVE";
|
|
696
|
+
COMPLETED: "COMPLETED";
|
|
697
|
+
CANCELLED: "CANCELLED";
|
|
698
|
+
READY: "READY";
|
|
699
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
700
|
+
WAITING: "WAITING";
|
|
701
|
+
DELEGATED: "DELEGATED";
|
|
702
|
+
}>>;
|
|
703
|
+
priority: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<0>, z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>;
|
|
704
|
+
add_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
705
|
+
remove_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
706
|
+
replace_parent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
707
|
+
replace_parent_from: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
708
|
+
block: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
709
|
+
removeBlock: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
710
|
+
}, z.core.$strip>;
|
|
711
|
+
declare const zUpdateTaskPath: z.ZodMiniObject<{
|
|
712
|
+
id: z.ZodMiniString<string>;
|
|
713
|
+
}, z.core.$strip>;
|
|
714
|
+
/**
|
|
715
|
+
* Updated
|
|
716
|
+
*/
|
|
717
|
+
declare const zUpdateTaskResponse: z.ZodMiniObject<{
|
|
718
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
719
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
720
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
721
|
+
encrypted: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
722
|
+
deadline: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
723
|
+
deadline_date: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
724
|
+
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
725
|
+
ACTIVE: "ACTIVE";
|
|
726
|
+
COMPLETED: "COMPLETED";
|
|
727
|
+
CANCELLED: "CANCELLED";
|
|
728
|
+
READY: "READY";
|
|
729
|
+
IN_PROGRESS: "IN_PROGRESS";
|
|
730
|
+
WAITING: "WAITING";
|
|
731
|
+
DELEGATED: "DELEGATED";
|
|
732
|
+
}>>;
|
|
733
|
+
completion: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
734
|
+
worked_time: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
735
|
+
priority: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<2>, z.ZodMiniLiteral<3>]>>>;
|
|
736
|
+
created: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
737
|
+
blocked_by: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
738
|
+
children: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniLazy<any>]>>>;
|
|
739
|
+
parents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
|
|
526
742
|
interface PerspecTaskOptions {
|
|
527
743
|
/**
|
|
528
744
|
* Your PerspecTask API key (begins with `pt_live_`). Create one in the web
|
|
@@ -607,4 +823,4 @@ declare function createTasksNamespace(client: Client): {
|
|
|
607
823
|
}>;
|
|
608
824
|
};
|
|
609
825
|
|
|
610
|
-
export { type ClientOptions, type CreateTaskData, type CreateTaskResponse, type CreateTaskResponses, type GetTaskData, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type ListTasksData, type ListTasksResponse, type ListTasksResponses, type Options, PerspecTask, type PerspecTaskOptions, type Task, Tasks, type UpdateTaskData, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, PerspecTask as default };
|
|
826
|
+
export { type ClientOptions, type CreateTaskData, type CreateTaskResponse, type CreateTaskResponses, type GetTaskData, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type ListTasksData, type ListTasksResponse, type ListTasksResponses, type Options, PerspecTask, type PerspecTaskOptions, type Task, Tasks, type UpdateTaskData, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, PerspecTask as default, zCreateTaskBody, zCreateTaskResponse, zGetTaskPath, zGetTaskQuery, zGetTaskResponse, zListTasksQuery, zListTasksResponse, zTask, zUpdateTaskBody, zUpdateTaskPath, zUpdateTaskResponse };
|