@workast/sdk 3.1.0 → 3.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/dist/{chunk-LR7MGXLV.js → chunk-77N6V6HL.js} +135 -5
- package/dist/chunk-77N6V6HL.js.map +1 -0
- package/dist/index.cjs +134 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +370 -6
- package/dist/index.d.ts +370 -6
- package/dist/index.js +1 -1
- package/dist/mock.cjs +134 -4
- package/dist/mock.cjs.map +1 -1
- package/dist/mock.d.cts +1 -1
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +1 -1
- package/dist/mock.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-LR7MGXLV.js.map +0 -1
package/dist/mock.cjs
CHANGED
|
@@ -151,6 +151,7 @@ var Attachments = class {
|
|
|
151
151
|
client;
|
|
152
152
|
/**
|
|
153
153
|
* Get a signed URL to download an attachment file.
|
|
154
|
+
* Requires `file:find`.
|
|
154
155
|
*
|
|
155
156
|
* @example
|
|
156
157
|
* const attachment = await workast.attachments.retrieveFileUrl('attachment-id');
|
|
@@ -177,6 +178,7 @@ var CalendarEventsResource = class {
|
|
|
177
178
|
client;
|
|
178
179
|
/**
|
|
179
180
|
* List user calendar events.
|
|
181
|
+
* Requires `calendar:find`.
|
|
180
182
|
*
|
|
181
183
|
* @example
|
|
182
184
|
* const results = await workast.calendar.events.list({ from: '2025-10-29', to: '2025-11-05' });
|
|
@@ -220,6 +222,7 @@ var Fields = class {
|
|
|
220
222
|
client;
|
|
221
223
|
/**
|
|
222
224
|
* List custom fields in the team.
|
|
225
|
+
* Requires one of: `field:find` (least privilege) or `field:manage`.
|
|
223
226
|
*
|
|
224
227
|
* @example
|
|
225
228
|
* const fields = await workast.fields.list({ listId: 'list-id' });
|
|
@@ -238,6 +241,7 @@ var Fields = class {
|
|
|
238
241
|
}
|
|
239
242
|
/**
|
|
240
243
|
* Create a custom field.
|
|
244
|
+
* Requires `field:manage`.
|
|
241
245
|
*
|
|
242
246
|
* @example
|
|
243
247
|
* const field = await workast.fields.create({ name: 'Priority', type: 'text' });
|
|
@@ -247,6 +251,7 @@ var Fields = class {
|
|
|
247
251
|
}
|
|
248
252
|
/**
|
|
249
253
|
* Update a custom field.
|
|
254
|
+
* Requires `field:manage`.
|
|
250
255
|
*
|
|
251
256
|
* @example
|
|
252
257
|
* const field = await workast.fields.update('field-id', { name: 'Priority' });
|
|
@@ -261,6 +266,7 @@ var Fields = class {
|
|
|
261
266
|
}
|
|
262
267
|
/**
|
|
263
268
|
* Remove a custom field.
|
|
269
|
+
* Requires `field:manage`.
|
|
264
270
|
*
|
|
265
271
|
* @example
|
|
266
272
|
* await workast.fields.del('field-id');
|
|
@@ -283,6 +289,7 @@ var ListSublists = class {
|
|
|
283
289
|
client;
|
|
284
290
|
/**
|
|
285
291
|
* List unique sublist names across lists.
|
|
292
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
286
293
|
*
|
|
287
294
|
* @example
|
|
288
295
|
* const names = await workast.lists.sublists.list({ types: ['group'] });
|
|
@@ -306,6 +313,7 @@ var ListSublists = class {
|
|
|
306
313
|
}
|
|
307
314
|
/**
|
|
308
315
|
* Create a sublist in a list.
|
|
316
|
+
* Requires one of: `list:create` (least privilege) or `list:manage`.
|
|
309
317
|
*
|
|
310
318
|
* @example
|
|
311
319
|
* const sublist = await workast.lists.sublists.create('list-id', { name: 'To-do' });
|
|
@@ -320,6 +328,7 @@ var ListSublists = class {
|
|
|
320
328
|
}
|
|
321
329
|
/**
|
|
322
330
|
* Update a sublist.
|
|
331
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
323
332
|
*
|
|
324
333
|
* @example
|
|
325
334
|
* await workast.lists.sublists.update('list-id', 'sublist-id', { name: 'Done' });
|
|
@@ -334,6 +343,7 @@ var ListSublists = class {
|
|
|
334
343
|
}
|
|
335
344
|
/**
|
|
336
345
|
* Remove a sublist.
|
|
346
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
337
347
|
*
|
|
338
348
|
* @example
|
|
339
349
|
* await workast.lists.sublists.del('list-id', 'sublist-id');
|
|
@@ -354,6 +364,7 @@ var ListParticipantsResource = class {
|
|
|
354
364
|
client;
|
|
355
365
|
/**
|
|
356
366
|
* List participants on a list.
|
|
367
|
+
* Requires one of: `list:participant:find` (least privilege) or `list:manage`.
|
|
357
368
|
*
|
|
358
369
|
* @example
|
|
359
370
|
* const users = await workast.lists.participants.list('list-id');
|
|
@@ -368,6 +379,7 @@ var ListParticipantsResource = class {
|
|
|
368
379
|
}
|
|
369
380
|
/**
|
|
370
381
|
* Add participants to a list.
|
|
382
|
+
* Requires one of: `list:participant:manage` (least privilege) or `list:manage`.
|
|
371
383
|
*
|
|
372
384
|
* @example
|
|
373
385
|
* await workast.lists.participants.add('list-id', { users: ['user-id'] });
|
|
@@ -382,6 +394,7 @@ var ListParticipantsResource = class {
|
|
|
382
394
|
}
|
|
383
395
|
/**
|
|
384
396
|
* Remove participants from a list.
|
|
397
|
+
* Requires one of: `list:participant:manage` (least privilege) or `list:manage`.
|
|
385
398
|
*
|
|
386
399
|
* @example
|
|
387
400
|
* await workast.lists.participants.del('list-id', { users: ['user-id'] });
|
|
@@ -402,6 +415,7 @@ var ListFields = class {
|
|
|
402
415
|
client;
|
|
403
416
|
/**
|
|
404
417
|
* Enable a custom field on a list.
|
|
418
|
+
* Requires `field:manage`.
|
|
405
419
|
*
|
|
406
420
|
* @example
|
|
407
421
|
* await workast.lists.fields.enable('list-id', 'field-id');
|
|
@@ -416,6 +430,7 @@ var ListFields = class {
|
|
|
416
430
|
}
|
|
417
431
|
/**
|
|
418
432
|
* Disable a custom field on a list.
|
|
433
|
+
* Requires `field:manage`.
|
|
419
434
|
*
|
|
420
435
|
* @example
|
|
421
436
|
* await workast.lists.fields.disable('list-id', 'field-id');
|
|
@@ -442,6 +457,7 @@ var Lists = class {
|
|
|
442
457
|
fields;
|
|
443
458
|
/**
|
|
444
459
|
* Create a list.
|
|
460
|
+
* Requires one of: `list:create` (least privilege) or `list:manage`.
|
|
445
461
|
*
|
|
446
462
|
* @example
|
|
447
463
|
* const list = await workast.lists.create({ name: 'Engineering' });
|
|
@@ -451,6 +467,7 @@ var Lists = class {
|
|
|
451
467
|
}
|
|
452
468
|
/**
|
|
453
469
|
* Get a list by ID.
|
|
470
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
454
471
|
*
|
|
455
472
|
* @example
|
|
456
473
|
* const list = await workast.lists.retrieve('list-id');
|
|
@@ -460,6 +477,7 @@ var Lists = class {
|
|
|
460
477
|
}
|
|
461
478
|
/**
|
|
462
479
|
* Update a list.
|
|
480
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
463
481
|
*
|
|
464
482
|
* @example
|
|
465
483
|
* await workast.lists.update('list-id', { name: 'Engineering' });
|
|
@@ -469,6 +487,7 @@ var Lists = class {
|
|
|
469
487
|
}
|
|
470
488
|
/**
|
|
471
489
|
* Search lists.
|
|
490
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
472
491
|
*
|
|
473
492
|
* @example
|
|
474
493
|
* const lists = await workast.lists.list({ type: 'group', limit: 10 });
|
|
@@ -516,6 +535,7 @@ var Lists = class {
|
|
|
516
535
|
}
|
|
517
536
|
/**
|
|
518
537
|
* Get the personal list.
|
|
538
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
519
539
|
*
|
|
520
540
|
* @example
|
|
521
541
|
* const list = await workast.lists.retrievePersonal();
|
|
@@ -525,6 +545,7 @@ var Lists = class {
|
|
|
525
545
|
}
|
|
526
546
|
/**
|
|
527
547
|
* Archive a list.
|
|
548
|
+
* Requires `list:manage`.
|
|
528
549
|
*
|
|
529
550
|
* @example
|
|
530
551
|
* await workast.lists.archive('list-id');
|
|
@@ -539,6 +560,7 @@ var Lists = class {
|
|
|
539
560
|
}
|
|
540
561
|
/**
|
|
541
562
|
* Unarchive a list.
|
|
563
|
+
* Requires `list:manage`.
|
|
542
564
|
*
|
|
543
565
|
* @example
|
|
544
566
|
* await workast.lists.unarchive('list-id');
|
|
@@ -553,6 +575,7 @@ var Lists = class {
|
|
|
553
575
|
}
|
|
554
576
|
/**
|
|
555
577
|
* Join a list.
|
|
578
|
+
* Requires `list:join`.
|
|
556
579
|
*
|
|
557
580
|
* @example
|
|
558
581
|
* await workast.lists.join('list-id');
|
|
@@ -567,6 +590,7 @@ var Lists = class {
|
|
|
567
590
|
}
|
|
568
591
|
/**
|
|
569
592
|
* Request access to a private list.
|
|
593
|
+
* Requires `list:join`.
|
|
570
594
|
*
|
|
571
595
|
* @example
|
|
572
596
|
* await workast.lists.requestAccess('list-id');
|
|
@@ -581,6 +605,7 @@ var Lists = class {
|
|
|
581
605
|
}
|
|
582
606
|
/**
|
|
583
607
|
* Import a template into a list.
|
|
608
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
584
609
|
*
|
|
585
610
|
* @example
|
|
586
611
|
* await workast.lists.importTemplate('list-id', 'template-id', { updateDueDates: 30 });
|
|
@@ -603,6 +628,7 @@ var MeetingsResource = class {
|
|
|
603
628
|
client;
|
|
604
629
|
/**
|
|
605
630
|
* List meetings.
|
|
631
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
606
632
|
*
|
|
607
633
|
* @example
|
|
608
634
|
* const results = await workast.meetings.list({ timeMin: '2026-01-01T00:00:00Z', maxResults: 15 });
|
|
@@ -635,6 +661,7 @@ var MeetingsResource = class {
|
|
|
635
661
|
}
|
|
636
662
|
/**
|
|
637
663
|
* Create a meeting from a calendar event, or create a new calendar event.
|
|
664
|
+
* Requires `meeting:manage`.
|
|
638
665
|
*
|
|
639
666
|
* @example
|
|
640
667
|
* const meeting = await workast.meetings.createFromEvent({
|
|
@@ -648,6 +675,7 @@ var MeetingsResource = class {
|
|
|
648
675
|
}
|
|
649
676
|
/**
|
|
650
677
|
* Get a meeting by ID.
|
|
678
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
651
679
|
*
|
|
652
680
|
* @example
|
|
653
681
|
* const meeting = await workast.meetings.retrieve('meeting-id');
|
|
@@ -657,6 +685,7 @@ var MeetingsResource = class {
|
|
|
657
685
|
}
|
|
658
686
|
/**
|
|
659
687
|
* Update meeting notes.
|
|
688
|
+
* Requires `meeting:manage`.
|
|
660
689
|
*
|
|
661
690
|
* @example
|
|
662
691
|
* const meeting = await workast.meetings.update('meeting-id', { notes: 'Ship v3' });
|
|
@@ -666,6 +695,7 @@ var MeetingsResource = class {
|
|
|
666
695
|
}
|
|
667
696
|
/**
|
|
668
697
|
* Get meeting recording assets and transcript.
|
|
698
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
669
699
|
*
|
|
670
700
|
* @example
|
|
671
701
|
* const recording = await workast.meetings.retrieveRecording('meeting-id');
|
|
@@ -680,6 +710,7 @@ var MeetingsResource = class {
|
|
|
680
710
|
}
|
|
681
711
|
/**
|
|
682
712
|
* Enable the notetaker for a meeting.
|
|
713
|
+
* Requires `meeting:manage`.
|
|
683
714
|
*
|
|
684
715
|
* @example
|
|
685
716
|
* const meeting = await workast.meetings.enableNotetaker('meeting-id', {
|
|
@@ -696,6 +727,7 @@ var MeetingsResource = class {
|
|
|
696
727
|
}
|
|
697
728
|
/**
|
|
698
729
|
* Disable or remove the notetaker from a meeting.
|
|
730
|
+
* Requires `meeting:manage`.
|
|
699
731
|
*
|
|
700
732
|
* @example
|
|
701
733
|
* const meeting = await workast.meetings.disableNotetaker('meeting-id');
|
|
@@ -718,6 +750,7 @@ var NotesResource = class {
|
|
|
718
750
|
client;
|
|
719
751
|
/**
|
|
720
752
|
* List notes.
|
|
753
|
+
* Requires one of: `note:find` (least privilege) or `note:manage`.
|
|
721
754
|
*
|
|
722
755
|
* @example
|
|
723
756
|
* const results = await workast.notes.list({ title: 'Spec', limit: 10 });
|
|
@@ -758,6 +791,7 @@ var NotesResource = class {
|
|
|
758
791
|
}
|
|
759
792
|
/**
|
|
760
793
|
* Get a note by ID.
|
|
794
|
+
* Requires one of: `note:find` (least privilege) or `note:manage`.
|
|
761
795
|
*
|
|
762
796
|
* @example
|
|
763
797
|
* const note = await workast.notes.retrieve('note-id');
|
|
@@ -767,6 +801,7 @@ var NotesResource = class {
|
|
|
767
801
|
}
|
|
768
802
|
/**
|
|
769
803
|
* Update a note.
|
|
804
|
+
* Requires one of: `note:update` (least privilege) or `note:manage`.
|
|
770
805
|
*
|
|
771
806
|
* @example
|
|
772
807
|
* const note = await workast.notes.update('note-id', { title: 'Spec', version: 1, body: '<p>Hello</p>' });
|
|
@@ -776,6 +811,7 @@ var NotesResource = class {
|
|
|
776
811
|
}
|
|
777
812
|
/**
|
|
778
813
|
* Delete a note.
|
|
814
|
+
* Requires `note:manage`.
|
|
779
815
|
*
|
|
780
816
|
* @example
|
|
781
817
|
* await workast.notes.del('note-id');
|
|
@@ -793,6 +829,7 @@ var NotificationsResource = class {
|
|
|
793
829
|
client;
|
|
794
830
|
/**
|
|
795
831
|
* List notifications for the logged-in user.
|
|
832
|
+
* Requires one of: `notification:find` (least privilege) or `notification:manage`.
|
|
796
833
|
*
|
|
797
834
|
* @example
|
|
798
835
|
* const results = await workast.notifications.list({ read: false, limit: 10 });
|
|
@@ -820,6 +857,7 @@ var NotificationsResource = class {
|
|
|
820
857
|
}
|
|
821
858
|
/**
|
|
822
859
|
* Mark a notification as read.
|
|
860
|
+
* Requires `notification:manage`.
|
|
823
861
|
*
|
|
824
862
|
* @example
|
|
825
863
|
* await workast.notifications.markRead('notification-id');
|
|
@@ -834,6 +872,7 @@ var NotificationsResource = class {
|
|
|
834
872
|
}
|
|
835
873
|
/**
|
|
836
874
|
* Mark a notification as unread.
|
|
875
|
+
* Requires `notification:manage`.
|
|
837
876
|
*
|
|
838
877
|
* @example
|
|
839
878
|
* await workast.notifications.markUnread('notification-id');
|
|
@@ -856,6 +895,7 @@ var Reactions = class {
|
|
|
856
895
|
client;
|
|
857
896
|
/**
|
|
858
897
|
* Add a reaction to an activity.
|
|
898
|
+
* Requires one of: `activity:react` (least privilege) or `task:manage`.
|
|
859
899
|
*
|
|
860
900
|
* @example
|
|
861
901
|
* const reaction = await workast.reactions.add('activity-id', { emoji: ':+1:' });
|
|
@@ -870,6 +910,7 @@ var Reactions = class {
|
|
|
870
910
|
}
|
|
871
911
|
/**
|
|
872
912
|
* Remove a reaction from an activity.
|
|
913
|
+
* Requires one of: `activity:react` (least privilege) or `task:manage`.
|
|
873
914
|
*
|
|
874
915
|
* @example
|
|
875
916
|
* await workast.reactions.del('activity-id', 'reaction-id');
|
|
@@ -892,9 +933,10 @@ var SearchesResource = class {
|
|
|
892
933
|
client;
|
|
893
934
|
/**
|
|
894
935
|
* List searches for the logged-in user.
|
|
936
|
+
* Requires one of: `search:find` (least privilege) or `search:manage`.
|
|
895
937
|
*
|
|
896
938
|
* @example
|
|
897
|
-
* const results = await workast.searches.list({
|
|
939
|
+
* const results = await workast.searches.list({ limit: 10 });
|
|
898
940
|
*/
|
|
899
941
|
list(query, options) {
|
|
900
942
|
const params = new URLSearchParams(options?.query);
|
|
@@ -907,9 +949,6 @@ var SearchesResource = class {
|
|
|
907
949
|
if (query?.sort) {
|
|
908
950
|
params.set("sort", query.sort);
|
|
909
951
|
}
|
|
910
|
-
if (query?.home != null) {
|
|
911
|
-
params.set("home", String(query.home));
|
|
912
|
-
}
|
|
913
952
|
return this.client.request(
|
|
914
953
|
"GET",
|
|
915
954
|
"/search",
|
|
@@ -919,6 +958,7 @@ var SearchesResource = class {
|
|
|
919
958
|
}
|
|
920
959
|
/**
|
|
921
960
|
* Create a search.
|
|
961
|
+
* Requires `search:manage`.
|
|
922
962
|
*
|
|
923
963
|
* @example
|
|
924
964
|
* const search = await workast.searches.create({
|
|
@@ -931,6 +971,7 @@ var SearchesResource = class {
|
|
|
931
971
|
}
|
|
932
972
|
/**
|
|
933
973
|
* Get a search by ID.
|
|
974
|
+
* Requires one of: `search:find` (least privilege) or `search:manage`.
|
|
934
975
|
*
|
|
935
976
|
* @example
|
|
936
977
|
* const search = await workast.searches.retrieve('search-id');
|
|
@@ -954,6 +995,7 @@ var SearchesResource = class {
|
|
|
954
995
|
}
|
|
955
996
|
/**
|
|
956
997
|
* Update a search.
|
|
998
|
+
* Requires `search:manage`.
|
|
957
999
|
*
|
|
958
1000
|
* @example
|
|
959
1001
|
* const search = await workast.searches.update('search-id', { name: 'Updated' });
|
|
@@ -968,6 +1010,7 @@ var SearchesResource = class {
|
|
|
968
1010
|
}
|
|
969
1011
|
/**
|
|
970
1012
|
* Delete a search.
|
|
1013
|
+
* Requires `search:manage`.
|
|
971
1014
|
*
|
|
972
1015
|
* @example
|
|
973
1016
|
* await workast.searches.del('search-id');
|
|
@@ -980,8 +1023,31 @@ var SearchesResource = class {
|
|
|
980
1023
|
options
|
|
981
1024
|
);
|
|
982
1025
|
}
|
|
1026
|
+
/**
|
|
1027
|
+
* List searches pinned on the home screen.
|
|
1028
|
+
* Requires one of: `home:search:find` (least privilege) or `home:search:manage`.
|
|
1029
|
+
*
|
|
1030
|
+
* @example
|
|
1031
|
+
* const results = await workast.searches.listHome({ limit: 10 });
|
|
1032
|
+
*/
|
|
1033
|
+
listHome(query, options) {
|
|
1034
|
+
const params = new URLSearchParams(options?.query);
|
|
1035
|
+
if (query?.limit != null) {
|
|
1036
|
+
params.set("limit", String(query.limit));
|
|
1037
|
+
}
|
|
1038
|
+
if (query?.skip != null) {
|
|
1039
|
+
params.set("skip", String(query.skip));
|
|
1040
|
+
}
|
|
1041
|
+
return this.client.request(
|
|
1042
|
+
"GET",
|
|
1043
|
+
"/search/home",
|
|
1044
|
+
void 0,
|
|
1045
|
+
params.toString() ? { ...options, query: params } : options
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
983
1048
|
/**
|
|
984
1049
|
* Add a search to the home screen.
|
|
1050
|
+
* Requires `home:search:manage`.
|
|
985
1051
|
*
|
|
986
1052
|
* @example
|
|
987
1053
|
* await workast.searches.addHome('search-id');
|
|
@@ -996,6 +1062,7 @@ var SearchesResource = class {
|
|
|
996
1062
|
}
|
|
997
1063
|
/**
|
|
998
1064
|
* Remove a search from the home screen.
|
|
1065
|
+
* Requires `home:search:manage`.
|
|
999
1066
|
*
|
|
1000
1067
|
* @example
|
|
1001
1068
|
* await workast.searches.removeHome('search-id');
|
|
@@ -1010,6 +1077,7 @@ var SearchesResource = class {
|
|
|
1010
1077
|
}
|
|
1011
1078
|
/**
|
|
1012
1079
|
* Share a search with users.
|
|
1080
|
+
* Requires `search:manage`.
|
|
1013
1081
|
*
|
|
1014
1082
|
* @example
|
|
1015
1083
|
* await workast.searches.share('search-id', { users: ['user-id'] });
|
|
@@ -1024,6 +1092,7 @@ var SearchesResource = class {
|
|
|
1024
1092
|
}
|
|
1025
1093
|
/**
|
|
1026
1094
|
* Unshare a search from users.
|
|
1095
|
+
* Requires `search:manage`.
|
|
1027
1096
|
*
|
|
1028
1097
|
* @example
|
|
1029
1098
|
* await workast.searches.unshare('search-id', { users: ['user-id'] });
|
|
@@ -1038,6 +1107,7 @@ var SearchesResource = class {
|
|
|
1038
1107
|
}
|
|
1039
1108
|
/**
|
|
1040
1109
|
* Set a reminder on a search.
|
|
1110
|
+
* Requires `search:manage`.
|
|
1041
1111
|
*
|
|
1042
1112
|
* @example
|
|
1043
1113
|
* await workast.searches.setReminder('search-id', {
|
|
@@ -1054,6 +1124,7 @@ var SearchesResource = class {
|
|
|
1054
1124
|
}
|
|
1055
1125
|
/**
|
|
1056
1126
|
* Delete a reminder from a search.
|
|
1127
|
+
* Requires `search:manage`.
|
|
1057
1128
|
*
|
|
1058
1129
|
* @example
|
|
1059
1130
|
* await workast.searches.delReminder('search-id');
|
|
@@ -1076,6 +1147,7 @@ var Tags = class {
|
|
|
1076
1147
|
client;
|
|
1077
1148
|
/**
|
|
1078
1149
|
* List tags in the team.
|
|
1150
|
+
* Requires one of: `tag:find` (least privilege) or `tag:manage`.
|
|
1079
1151
|
*
|
|
1080
1152
|
* @example
|
|
1081
1153
|
* const tags = await workast.tags.list({ listId: 'list-id' });
|
|
@@ -1097,6 +1169,7 @@ var Tags = class {
|
|
|
1097
1169
|
}
|
|
1098
1170
|
/**
|
|
1099
1171
|
* Create a tag.
|
|
1172
|
+
* Requires `tag:manage`.
|
|
1100
1173
|
*
|
|
1101
1174
|
* @example
|
|
1102
1175
|
* const tag = await workast.tags.create({ name: 'Priority', color: '#ff0000' });
|
|
@@ -1106,6 +1179,7 @@ var Tags = class {
|
|
|
1106
1179
|
}
|
|
1107
1180
|
/**
|
|
1108
1181
|
* Update a tag.
|
|
1182
|
+
* Requires `tag:manage`.
|
|
1109
1183
|
*
|
|
1110
1184
|
* @example
|
|
1111
1185
|
* const tag = await workast.tags.update('tag-id', { name: 'Priority' });
|
|
@@ -1120,6 +1194,7 @@ var Tags = class {
|
|
|
1120
1194
|
}
|
|
1121
1195
|
/**
|
|
1122
1196
|
* Delete a tag.
|
|
1197
|
+
* Requires `tag:manage`.
|
|
1123
1198
|
*
|
|
1124
1199
|
* @example
|
|
1125
1200
|
* await workast.tags.del('tag-id');
|
|
@@ -1142,6 +1217,7 @@ var TaskSubtasks = class {
|
|
|
1142
1217
|
client;
|
|
1143
1218
|
/**
|
|
1144
1219
|
* Create a subtask on a task.
|
|
1220
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1145
1221
|
*
|
|
1146
1222
|
* @example
|
|
1147
1223
|
* const subtask = await workast.tasks.subtasks.create('task-id', { text: 'Write tests' });
|
|
@@ -1157,6 +1233,7 @@ var TaskDependencies = class {
|
|
|
1157
1233
|
client;
|
|
1158
1234
|
/**
|
|
1159
1235
|
* Add a dependency to a task.
|
|
1236
|
+
* Requires one of: `task:manage:dependency` (least privilege) or `task:manage`.
|
|
1160
1237
|
*
|
|
1161
1238
|
* @example
|
|
1162
1239
|
* await workast.tasks.dependencies.add('task-id', 'dependency-id');
|
|
@@ -1171,6 +1248,7 @@ var TaskDependencies = class {
|
|
|
1171
1248
|
}
|
|
1172
1249
|
/**
|
|
1173
1250
|
* Remove a dependency from a task.
|
|
1251
|
+
* Requires one of: `task:manage:dependency` (least privilege) or `task:manage`.
|
|
1174
1252
|
*
|
|
1175
1253
|
* @example
|
|
1176
1254
|
* await workast.tasks.dependencies.del('task-id', 'dependency-id');
|
|
@@ -1191,6 +1269,7 @@ var TaskAttachments = class {
|
|
|
1191
1269
|
client;
|
|
1192
1270
|
/**
|
|
1193
1271
|
* Create an attachment on a task.
|
|
1272
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1194
1273
|
*
|
|
1195
1274
|
* @example
|
|
1196
1275
|
* const attachment = await workast.tasks.attachments.create('task-id', { author: 'user-id' });
|
|
@@ -1200,6 +1279,7 @@ var TaskAttachments = class {
|
|
|
1200
1279
|
}
|
|
1201
1280
|
/**
|
|
1202
1281
|
* Update a task attachment.
|
|
1282
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1203
1283
|
*
|
|
1204
1284
|
* @example
|
|
1205
1285
|
* const attachment = await workast.tasks.attachments.update('task-id', 'attachment-id', { date: '2026-01-01' });
|
|
@@ -1214,6 +1294,7 @@ var TaskAttachments = class {
|
|
|
1214
1294
|
}
|
|
1215
1295
|
/**
|
|
1216
1296
|
* Delete a task attachment.
|
|
1297
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1217
1298
|
*
|
|
1218
1299
|
* @example
|
|
1219
1300
|
* await workast.tasks.attachments.del('task-id', 'attachment-id');
|
|
@@ -1234,6 +1315,7 @@ var TaskActivitiesResource = class {
|
|
|
1234
1315
|
client;
|
|
1235
1316
|
/**
|
|
1236
1317
|
* List activities on a task.
|
|
1318
|
+
* Requires one of: `task:activity:find` (least privilege) or `task:manage`.
|
|
1237
1319
|
*
|
|
1238
1320
|
* @example
|
|
1239
1321
|
* const results = await workast.tasks.activities.list('task-id', { type: ['comment'], limit: 10 });
|
|
@@ -1268,6 +1350,7 @@ var TaskActivitiesResource = class {
|
|
|
1268
1350
|
}
|
|
1269
1351
|
/**
|
|
1270
1352
|
* Create a comment activity on a task.
|
|
1353
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1271
1354
|
*
|
|
1272
1355
|
* @example
|
|
1273
1356
|
* const activity = await workast.tasks.activities.create('task-id', { type: 'comment', value: 'Looks good' });
|
|
@@ -1277,6 +1360,7 @@ var TaskActivitiesResource = class {
|
|
|
1277
1360
|
}
|
|
1278
1361
|
/**
|
|
1279
1362
|
* Update a task activity.
|
|
1363
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1280
1364
|
*
|
|
1281
1365
|
* @example
|
|
1282
1366
|
* await workast.tasks.activities.update('task-id', 'activity-id', { value: 'Updated comment' });
|
|
@@ -1291,6 +1375,7 @@ var TaskActivitiesResource = class {
|
|
|
1291
1375
|
}
|
|
1292
1376
|
/**
|
|
1293
1377
|
* Delete a task activity.
|
|
1378
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1294
1379
|
*
|
|
1295
1380
|
* @example
|
|
1296
1381
|
* await workast.tasks.activities.del('task-id', 'activity-id');
|
|
@@ -1319,6 +1404,7 @@ var Tasks = class {
|
|
|
1319
1404
|
activities;
|
|
1320
1405
|
/**
|
|
1321
1406
|
* Create a task in a list.
|
|
1407
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1322
1408
|
*
|
|
1323
1409
|
* @example
|
|
1324
1410
|
* const task = await workast.tasks.create('list-id', { text: 'Ship v3' });
|
|
@@ -1326,8 +1412,19 @@ var Tasks = class {
|
|
|
1326
1412
|
create(listId, body, options) {
|
|
1327
1413
|
return this.client.request("POST", `/list/${encodeURIComponent(listId)}/task`, body, options);
|
|
1328
1414
|
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Create a task in the personal list.
|
|
1417
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1418
|
+
*
|
|
1419
|
+
* @example
|
|
1420
|
+
* const task = await workast.tasks.createPersonal({ text: 'Ship v3' });
|
|
1421
|
+
*/
|
|
1422
|
+
createPersonal(body, options) {
|
|
1423
|
+
return this.client.request("POST", "/list/personal/task", body, options);
|
|
1424
|
+
}
|
|
1329
1425
|
/**
|
|
1330
1426
|
* Get a task by ID.
|
|
1427
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1331
1428
|
*
|
|
1332
1429
|
* @example
|
|
1333
1430
|
* const task = await workast.tasks.retrieve('task-id');
|
|
@@ -1337,6 +1434,7 @@ var Tasks = class {
|
|
|
1337
1434
|
}
|
|
1338
1435
|
/**
|
|
1339
1436
|
* Get a task by short ID.
|
|
1437
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1340
1438
|
*
|
|
1341
1439
|
* @example
|
|
1342
1440
|
* const task = await workast.tasks.retrieveByShortId('t4k1');
|
|
@@ -1346,6 +1444,7 @@ var Tasks = class {
|
|
|
1346
1444
|
}
|
|
1347
1445
|
/**
|
|
1348
1446
|
* Update a task.
|
|
1447
|
+
* Requires `task:manage`.
|
|
1349
1448
|
*
|
|
1350
1449
|
* @example
|
|
1351
1450
|
* await workast.tasks.update('task-id', { text: 'Ship v3' });
|
|
@@ -1355,6 +1454,7 @@ var Tasks = class {
|
|
|
1355
1454
|
}
|
|
1356
1455
|
/**
|
|
1357
1456
|
* Delete a task.
|
|
1457
|
+
* Requires one of: `task:manage:remove` (least privilege) or `task:manage`.
|
|
1358
1458
|
*
|
|
1359
1459
|
* @example
|
|
1360
1460
|
* await workast.tasks.del('task-id');
|
|
@@ -1364,6 +1464,7 @@ var Tasks = class {
|
|
|
1364
1464
|
}
|
|
1365
1465
|
/**
|
|
1366
1466
|
* Search tasks.
|
|
1467
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1367
1468
|
*
|
|
1368
1469
|
* @example
|
|
1369
1470
|
* const results = await workast.tasks.list({
|
|
@@ -1375,6 +1476,7 @@ var Tasks = class {
|
|
|
1375
1476
|
}
|
|
1376
1477
|
/**
|
|
1377
1478
|
* Complete a task.
|
|
1479
|
+
* Requires one of: `task:manage:status` (least privilege) or `task:manage`.
|
|
1378
1480
|
*
|
|
1379
1481
|
* @example
|
|
1380
1482
|
* await workast.tasks.complete('task-id');
|
|
@@ -1384,6 +1486,7 @@ var Tasks = class {
|
|
|
1384
1486
|
}
|
|
1385
1487
|
/**
|
|
1386
1488
|
* Uncomplete a task.
|
|
1489
|
+
* Requires one of: `task:manage:status` (least privilege) or `task:manage`.
|
|
1387
1490
|
*
|
|
1388
1491
|
* @example
|
|
1389
1492
|
* await workast.tasks.uncomplete('task-id');
|
|
@@ -1393,6 +1496,7 @@ var Tasks = class {
|
|
|
1393
1496
|
}
|
|
1394
1497
|
/**
|
|
1395
1498
|
* Assign users to a task.
|
|
1499
|
+
* Requires one of: `task:manage:assignee` (least privilege) or `task:manage`.
|
|
1396
1500
|
*
|
|
1397
1501
|
* @example
|
|
1398
1502
|
* await workast.tasks.assign('task-id', { users: ['user-id'] });
|
|
@@ -1402,6 +1506,7 @@ var Tasks = class {
|
|
|
1402
1506
|
}
|
|
1403
1507
|
/**
|
|
1404
1508
|
* Unassign users from a task.
|
|
1509
|
+
* Requires one of: `task:manage:assignee` (least privilege) or `task:manage`.
|
|
1405
1510
|
*
|
|
1406
1511
|
* @example
|
|
1407
1512
|
* await workast.tasks.unassign('task-id', { users: ['user-id'] });
|
|
@@ -1411,6 +1516,7 @@ var Tasks = class {
|
|
|
1411
1516
|
}
|
|
1412
1517
|
/**
|
|
1413
1518
|
* Add followers to a task.
|
|
1519
|
+
* Requires `user:task:follow`.
|
|
1414
1520
|
*
|
|
1415
1521
|
* @example
|
|
1416
1522
|
* await workast.tasks.follow('task-id', { users: ['user-id'] });
|
|
@@ -1420,6 +1526,7 @@ var Tasks = class {
|
|
|
1420
1526
|
}
|
|
1421
1527
|
/**
|
|
1422
1528
|
* Remove followers from a task.
|
|
1529
|
+
* Requires `user:task:follow`.
|
|
1423
1530
|
*
|
|
1424
1531
|
* @example
|
|
1425
1532
|
* await workast.tasks.unfollow('task-id', { users: ['user-id'] });
|
|
@@ -1429,6 +1536,7 @@ var Tasks = class {
|
|
|
1429
1536
|
}
|
|
1430
1537
|
/**
|
|
1431
1538
|
* Move tasks to another list.
|
|
1539
|
+
* Requires one of: `task:manage:move` (least privilege) or `task:manage`.
|
|
1432
1540
|
*
|
|
1433
1541
|
* @example
|
|
1434
1542
|
* await workast.tasks.move('list-id', { tasks: ['task-id'], target: 'other-list-id' });
|
|
@@ -1438,6 +1546,7 @@ var Tasks = class {
|
|
|
1438
1546
|
}
|
|
1439
1547
|
/**
|
|
1440
1548
|
* Create many tasks in a list.
|
|
1549
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1441
1550
|
*
|
|
1442
1551
|
* @example
|
|
1443
1552
|
* await workast.tasks.createMany('list-id', [{ text: 'One' }, { text: 'Two' }]);
|
|
@@ -1447,6 +1556,7 @@ var Tasks = class {
|
|
|
1447
1556
|
}
|
|
1448
1557
|
/**
|
|
1449
1558
|
* Update many tasks.
|
|
1559
|
+
* Requires `task:manage`.
|
|
1450
1560
|
*
|
|
1451
1561
|
* @example
|
|
1452
1562
|
* const result = await workast.tasks.updateMany({ tasks: ['task-id'], status: 'done' });
|
|
@@ -1456,6 +1566,7 @@ var Tasks = class {
|
|
|
1456
1566
|
}
|
|
1457
1567
|
/**
|
|
1458
1568
|
* List home (favourite) tasks.
|
|
1569
|
+
* Requires one of: `home:task:find` (least privilege) or `home:task:manage`.
|
|
1459
1570
|
*
|
|
1460
1571
|
* @example
|
|
1461
1572
|
* const home = await workast.tasks.listHome();
|
|
@@ -1465,6 +1576,7 @@ var Tasks = class {
|
|
|
1465
1576
|
}
|
|
1466
1577
|
/**
|
|
1467
1578
|
* Add a task to the home screen.
|
|
1579
|
+
* Requires `home:task:manage`.
|
|
1468
1580
|
*
|
|
1469
1581
|
* @example
|
|
1470
1582
|
* await workast.tasks.addHome('task-id');
|
|
@@ -1474,6 +1586,7 @@ var Tasks = class {
|
|
|
1474
1586
|
}
|
|
1475
1587
|
/**
|
|
1476
1588
|
* Remove a task from the home screen.
|
|
1589
|
+
* Requires `home:task:manage`.
|
|
1477
1590
|
*
|
|
1478
1591
|
* @example
|
|
1479
1592
|
* await workast.tasks.removeHome('task-id');
|
|
@@ -1483,6 +1596,7 @@ var Tasks = class {
|
|
|
1483
1596
|
}
|
|
1484
1597
|
/**
|
|
1485
1598
|
* Add tags to a task.
|
|
1599
|
+
* Requires one of: `task:manage:tag` (least privilege) or `task:manage`.
|
|
1486
1600
|
*
|
|
1487
1601
|
* @example
|
|
1488
1602
|
* await workast.tasks.addTag('task-id', { tags: ['tag-id'] });
|
|
@@ -1492,6 +1606,7 @@ var Tasks = class {
|
|
|
1492
1606
|
}
|
|
1493
1607
|
/**
|
|
1494
1608
|
* Remove tags from a task.
|
|
1609
|
+
* Requires one of: `task:manage:tag` (least privilege) or `task:manage`.
|
|
1495
1610
|
*
|
|
1496
1611
|
* @example
|
|
1497
1612
|
* await workast.tasks.removeTag('task-id', { tags: ['tag-id'] });
|
|
@@ -1501,6 +1616,7 @@ var Tasks = class {
|
|
|
1501
1616
|
}
|
|
1502
1617
|
/**
|
|
1503
1618
|
* Convert a task into a subtask of another task.
|
|
1619
|
+
* Requires `task:manage`.
|
|
1504
1620
|
*
|
|
1505
1621
|
* @example
|
|
1506
1622
|
* await workast.tasks.convertToSubtask('task-id', { parentTaskId: 'parent-id' });
|
|
@@ -1515,6 +1631,7 @@ var Tasks = class {
|
|
|
1515
1631
|
}
|
|
1516
1632
|
/**
|
|
1517
1633
|
* Convert a subtask into a standalone task.
|
|
1634
|
+
* Requires `task:manage`.
|
|
1518
1635
|
*
|
|
1519
1636
|
* @example
|
|
1520
1637
|
* const task = await workast.tasks.convertToTask('task-id');
|
|
@@ -1537,6 +1654,7 @@ var Tokens = class {
|
|
|
1537
1654
|
client;
|
|
1538
1655
|
/**
|
|
1539
1656
|
* Get the token details.
|
|
1657
|
+
* Requires any authenticated token (no specific scope).
|
|
1540
1658
|
*
|
|
1541
1659
|
* @example
|
|
1542
1660
|
* const token = await workast.tokens.retrieve();
|
|
@@ -1566,6 +1684,7 @@ var Users = class {
|
|
|
1566
1684
|
client;
|
|
1567
1685
|
/**
|
|
1568
1686
|
* Get the logged-in user.
|
|
1687
|
+
* Requires any authenticated token (no specific scope).
|
|
1569
1688
|
*
|
|
1570
1689
|
* @example
|
|
1571
1690
|
* const me = await workast.users.me();
|
|
@@ -1575,6 +1694,7 @@ var Users = class {
|
|
|
1575
1694
|
}
|
|
1576
1695
|
/**
|
|
1577
1696
|
* List users in the team.
|
|
1697
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1578
1698
|
*
|
|
1579
1699
|
* @example
|
|
1580
1700
|
* const users = await workast.users.list({ name: 'Ada', limit: 10 });
|
|
@@ -1612,6 +1732,7 @@ var Users = class {
|
|
|
1612
1732
|
}
|
|
1613
1733
|
/**
|
|
1614
1734
|
* Get a user by ID.
|
|
1735
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1615
1736
|
*
|
|
1616
1737
|
* @example
|
|
1617
1738
|
* const user = await workast.users.retrieve('user-id');
|
|
@@ -1621,6 +1742,7 @@ var Users = class {
|
|
|
1621
1742
|
}
|
|
1622
1743
|
/**
|
|
1623
1744
|
* Get a user by email.
|
|
1745
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1624
1746
|
*
|
|
1625
1747
|
* @example
|
|
1626
1748
|
* const user = await workast.users.retrieveByEmail('ada@example.com');
|
|
@@ -1639,6 +1761,7 @@ var Users = class {
|
|
|
1639
1761
|
}
|
|
1640
1762
|
/**
|
|
1641
1763
|
* Invite a user to the team.
|
|
1764
|
+
* Requires one of: `user:invite` (least privilege) or `user:manage`.
|
|
1642
1765
|
*
|
|
1643
1766
|
* @example
|
|
1644
1767
|
* const user = await workast.users.invite({ name: 'Ada', email: 'ada@example.com', role: 'member' });
|
|
@@ -1666,6 +1789,7 @@ var WorkflowsResource = class {
|
|
|
1666
1789
|
client;
|
|
1667
1790
|
/**
|
|
1668
1791
|
* List workflows created by the logged-in user.
|
|
1792
|
+
* Requires one of: `workflow:find` (least privilege) or `workflow:manage`.
|
|
1669
1793
|
*
|
|
1670
1794
|
* @example
|
|
1671
1795
|
* const results = await workast.workflows.list({ limit: 10, skip: 0 });
|
|
@@ -1675,6 +1799,7 @@ var WorkflowsResource = class {
|
|
|
1675
1799
|
}
|
|
1676
1800
|
/**
|
|
1677
1801
|
* Create a workflow.
|
|
1802
|
+
* Requires `workflow:manage`.
|
|
1678
1803
|
*
|
|
1679
1804
|
* @example
|
|
1680
1805
|
* const workflow = await workast.workflows.create({
|
|
@@ -1689,6 +1814,7 @@ var WorkflowsResource = class {
|
|
|
1689
1814
|
}
|
|
1690
1815
|
/**
|
|
1691
1816
|
* Get a workflow by ID.
|
|
1817
|
+
* Requires one of: `workflow:find` (least privilege) or `workflow:manage`.
|
|
1692
1818
|
*
|
|
1693
1819
|
* @example
|
|
1694
1820
|
* const workflow = await workast.workflows.retrieve('workflow-id');
|
|
@@ -1703,6 +1829,7 @@ var WorkflowsResource = class {
|
|
|
1703
1829
|
}
|
|
1704
1830
|
/**
|
|
1705
1831
|
* Update a workflow.
|
|
1832
|
+
* Requires `workflow:manage`.
|
|
1706
1833
|
*
|
|
1707
1834
|
* @example
|
|
1708
1835
|
* await workast.workflows.update('workflow-id', { prompt: 'Ship v3' });
|
|
@@ -1717,6 +1844,7 @@ var WorkflowsResource = class {
|
|
|
1717
1844
|
}
|
|
1718
1845
|
/**
|
|
1719
1846
|
* Delete a workflow.
|
|
1847
|
+
* Requires `workflow:manage`.
|
|
1720
1848
|
*
|
|
1721
1849
|
* @example
|
|
1722
1850
|
* await workast.workflows.del('workflow-id');
|
|
@@ -1731,6 +1859,7 @@ var WorkflowsResource = class {
|
|
|
1731
1859
|
}
|
|
1732
1860
|
/**
|
|
1733
1861
|
* Activate a workflow.
|
|
1862
|
+
* Requires `workflow:manage`.
|
|
1734
1863
|
*
|
|
1735
1864
|
* @example
|
|
1736
1865
|
* await workast.workflows.activate('workflow-id');
|
|
@@ -1745,6 +1874,7 @@ var WorkflowsResource = class {
|
|
|
1745
1874
|
}
|
|
1746
1875
|
/**
|
|
1747
1876
|
* Deactivate a workflow.
|
|
1877
|
+
* Requires `workflow:manage`.
|
|
1748
1878
|
*
|
|
1749
1879
|
* @example
|
|
1750
1880
|
* await workast.workflows.deactivate('workflow-id');
|