@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/index.cjs
CHANGED
|
@@ -154,6 +154,7 @@ var Attachments = class {
|
|
|
154
154
|
client;
|
|
155
155
|
/**
|
|
156
156
|
* Get a signed URL to download an attachment file.
|
|
157
|
+
* Requires `file:find`.
|
|
157
158
|
*
|
|
158
159
|
* @example
|
|
159
160
|
* const attachment = await workast.attachments.retrieveFileUrl('attachment-id');
|
|
@@ -180,6 +181,7 @@ var CalendarEventsResource = class {
|
|
|
180
181
|
client;
|
|
181
182
|
/**
|
|
182
183
|
* List user calendar events.
|
|
184
|
+
* Requires `calendar:find`.
|
|
183
185
|
*
|
|
184
186
|
* @example
|
|
185
187
|
* const results = await workast.calendar.events.list({ from: '2025-10-29', to: '2025-11-05' });
|
|
@@ -223,6 +225,7 @@ var Fields = class {
|
|
|
223
225
|
client;
|
|
224
226
|
/**
|
|
225
227
|
* List custom fields in the team.
|
|
228
|
+
* Requires one of: `field:find` (least privilege) or `field:manage`.
|
|
226
229
|
*
|
|
227
230
|
* @example
|
|
228
231
|
* const fields = await workast.fields.list({ listId: 'list-id' });
|
|
@@ -241,6 +244,7 @@ var Fields = class {
|
|
|
241
244
|
}
|
|
242
245
|
/**
|
|
243
246
|
* Create a custom field.
|
|
247
|
+
* Requires `field:manage`.
|
|
244
248
|
*
|
|
245
249
|
* @example
|
|
246
250
|
* const field = await workast.fields.create({ name: 'Priority', type: 'text' });
|
|
@@ -250,6 +254,7 @@ var Fields = class {
|
|
|
250
254
|
}
|
|
251
255
|
/**
|
|
252
256
|
* Update a custom field.
|
|
257
|
+
* Requires `field:manage`.
|
|
253
258
|
*
|
|
254
259
|
* @example
|
|
255
260
|
* const field = await workast.fields.update('field-id', { name: 'Priority' });
|
|
@@ -264,6 +269,7 @@ var Fields = class {
|
|
|
264
269
|
}
|
|
265
270
|
/**
|
|
266
271
|
* Remove a custom field.
|
|
272
|
+
* Requires `field:manage`.
|
|
267
273
|
*
|
|
268
274
|
* @example
|
|
269
275
|
* await workast.fields.del('field-id');
|
|
@@ -286,6 +292,7 @@ var ListSublists = class {
|
|
|
286
292
|
client;
|
|
287
293
|
/**
|
|
288
294
|
* List unique sublist names across lists.
|
|
295
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
289
296
|
*
|
|
290
297
|
* @example
|
|
291
298
|
* const names = await workast.lists.sublists.list({ types: ['group'] });
|
|
@@ -309,6 +316,7 @@ var ListSublists = class {
|
|
|
309
316
|
}
|
|
310
317
|
/**
|
|
311
318
|
* Create a sublist in a list.
|
|
319
|
+
* Requires one of: `list:create` (least privilege) or `list:manage`.
|
|
312
320
|
*
|
|
313
321
|
* @example
|
|
314
322
|
* const sublist = await workast.lists.sublists.create('list-id', { name: 'To-do' });
|
|
@@ -323,6 +331,7 @@ var ListSublists = class {
|
|
|
323
331
|
}
|
|
324
332
|
/**
|
|
325
333
|
* Update a sublist.
|
|
334
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
326
335
|
*
|
|
327
336
|
* @example
|
|
328
337
|
* await workast.lists.sublists.update('list-id', 'sublist-id', { name: 'Done' });
|
|
@@ -337,6 +346,7 @@ var ListSublists = class {
|
|
|
337
346
|
}
|
|
338
347
|
/**
|
|
339
348
|
* Remove a sublist.
|
|
349
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
340
350
|
*
|
|
341
351
|
* @example
|
|
342
352
|
* await workast.lists.sublists.del('list-id', 'sublist-id');
|
|
@@ -357,6 +367,7 @@ var ListParticipantsResource = class {
|
|
|
357
367
|
client;
|
|
358
368
|
/**
|
|
359
369
|
* List participants on a list.
|
|
370
|
+
* Requires one of: `list:participant:find` (least privilege) or `list:manage`.
|
|
360
371
|
*
|
|
361
372
|
* @example
|
|
362
373
|
* const users = await workast.lists.participants.list('list-id');
|
|
@@ -371,6 +382,7 @@ var ListParticipantsResource = class {
|
|
|
371
382
|
}
|
|
372
383
|
/**
|
|
373
384
|
* Add participants to a list.
|
|
385
|
+
* Requires one of: `list:participant:manage` (least privilege) or `list:manage`.
|
|
374
386
|
*
|
|
375
387
|
* @example
|
|
376
388
|
* await workast.lists.participants.add('list-id', { users: ['user-id'] });
|
|
@@ -385,6 +397,7 @@ var ListParticipantsResource = class {
|
|
|
385
397
|
}
|
|
386
398
|
/**
|
|
387
399
|
* Remove participants from a list.
|
|
400
|
+
* Requires one of: `list:participant:manage` (least privilege) or `list:manage`.
|
|
388
401
|
*
|
|
389
402
|
* @example
|
|
390
403
|
* await workast.lists.participants.del('list-id', { users: ['user-id'] });
|
|
@@ -405,6 +418,7 @@ var ListFields = class {
|
|
|
405
418
|
client;
|
|
406
419
|
/**
|
|
407
420
|
* Enable a custom field on a list.
|
|
421
|
+
* Requires `field:manage`.
|
|
408
422
|
*
|
|
409
423
|
* @example
|
|
410
424
|
* await workast.lists.fields.enable('list-id', 'field-id');
|
|
@@ -419,6 +433,7 @@ var ListFields = class {
|
|
|
419
433
|
}
|
|
420
434
|
/**
|
|
421
435
|
* Disable a custom field on a list.
|
|
436
|
+
* Requires `field:manage`.
|
|
422
437
|
*
|
|
423
438
|
* @example
|
|
424
439
|
* await workast.lists.fields.disable('list-id', 'field-id');
|
|
@@ -445,6 +460,7 @@ var Lists = class {
|
|
|
445
460
|
fields;
|
|
446
461
|
/**
|
|
447
462
|
* Create a list.
|
|
463
|
+
* Requires one of: `list:create` (least privilege) or `list:manage`.
|
|
448
464
|
*
|
|
449
465
|
* @example
|
|
450
466
|
* const list = await workast.lists.create({ name: 'Engineering' });
|
|
@@ -454,6 +470,7 @@ var Lists = class {
|
|
|
454
470
|
}
|
|
455
471
|
/**
|
|
456
472
|
* Get a list by ID.
|
|
473
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
457
474
|
*
|
|
458
475
|
* @example
|
|
459
476
|
* const list = await workast.lists.retrieve('list-id');
|
|
@@ -463,6 +480,7 @@ var Lists = class {
|
|
|
463
480
|
}
|
|
464
481
|
/**
|
|
465
482
|
* Update a list.
|
|
483
|
+
* Requires one of: `list:update` (least privilege) or `list:manage`.
|
|
466
484
|
*
|
|
467
485
|
* @example
|
|
468
486
|
* await workast.lists.update('list-id', { name: 'Engineering' });
|
|
@@ -472,6 +490,7 @@ var Lists = class {
|
|
|
472
490
|
}
|
|
473
491
|
/**
|
|
474
492
|
* Search lists.
|
|
493
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
475
494
|
*
|
|
476
495
|
* @example
|
|
477
496
|
* const lists = await workast.lists.list({ type: 'group', limit: 10 });
|
|
@@ -519,6 +538,7 @@ var Lists = class {
|
|
|
519
538
|
}
|
|
520
539
|
/**
|
|
521
540
|
* Get the personal list.
|
|
541
|
+
* Requires one of: `list:find` (least privilege) or `list:manage`.
|
|
522
542
|
*
|
|
523
543
|
* @example
|
|
524
544
|
* const list = await workast.lists.retrievePersonal();
|
|
@@ -528,6 +548,7 @@ var Lists = class {
|
|
|
528
548
|
}
|
|
529
549
|
/**
|
|
530
550
|
* Archive a list.
|
|
551
|
+
* Requires `list:manage`.
|
|
531
552
|
*
|
|
532
553
|
* @example
|
|
533
554
|
* await workast.lists.archive('list-id');
|
|
@@ -542,6 +563,7 @@ var Lists = class {
|
|
|
542
563
|
}
|
|
543
564
|
/**
|
|
544
565
|
* Unarchive a list.
|
|
566
|
+
* Requires `list:manage`.
|
|
545
567
|
*
|
|
546
568
|
* @example
|
|
547
569
|
* await workast.lists.unarchive('list-id');
|
|
@@ -556,6 +578,7 @@ var Lists = class {
|
|
|
556
578
|
}
|
|
557
579
|
/**
|
|
558
580
|
* Join a list.
|
|
581
|
+
* Requires `list:join`.
|
|
559
582
|
*
|
|
560
583
|
* @example
|
|
561
584
|
* await workast.lists.join('list-id');
|
|
@@ -570,6 +593,7 @@ var Lists = class {
|
|
|
570
593
|
}
|
|
571
594
|
/**
|
|
572
595
|
* Request access to a private list.
|
|
596
|
+
* Requires `list:join`.
|
|
573
597
|
*
|
|
574
598
|
* @example
|
|
575
599
|
* await workast.lists.requestAccess('list-id');
|
|
@@ -584,6 +608,7 @@ var Lists = class {
|
|
|
584
608
|
}
|
|
585
609
|
/**
|
|
586
610
|
* Import a template into a list.
|
|
611
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
587
612
|
*
|
|
588
613
|
* @example
|
|
589
614
|
* await workast.lists.importTemplate('list-id', 'template-id', { updateDueDates: 30 });
|
|
@@ -606,6 +631,7 @@ var MeetingsResource = class {
|
|
|
606
631
|
client;
|
|
607
632
|
/**
|
|
608
633
|
* List meetings.
|
|
634
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
609
635
|
*
|
|
610
636
|
* @example
|
|
611
637
|
* const results = await workast.meetings.list({ timeMin: '2026-01-01T00:00:00Z', maxResults: 15 });
|
|
@@ -638,6 +664,7 @@ var MeetingsResource = class {
|
|
|
638
664
|
}
|
|
639
665
|
/**
|
|
640
666
|
* Create a meeting from a calendar event, or create a new calendar event.
|
|
667
|
+
* Requires `meeting:manage`.
|
|
641
668
|
*
|
|
642
669
|
* @example
|
|
643
670
|
* const meeting = await workast.meetings.createFromEvent({
|
|
@@ -651,6 +678,7 @@ var MeetingsResource = class {
|
|
|
651
678
|
}
|
|
652
679
|
/**
|
|
653
680
|
* Get a meeting by ID.
|
|
681
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
654
682
|
*
|
|
655
683
|
* @example
|
|
656
684
|
* const meeting = await workast.meetings.retrieve('meeting-id');
|
|
@@ -660,6 +688,7 @@ var MeetingsResource = class {
|
|
|
660
688
|
}
|
|
661
689
|
/**
|
|
662
690
|
* Update meeting notes.
|
|
691
|
+
* Requires `meeting:manage`.
|
|
663
692
|
*
|
|
664
693
|
* @example
|
|
665
694
|
* const meeting = await workast.meetings.update('meeting-id', { notes: 'Ship v3' });
|
|
@@ -669,6 +698,7 @@ var MeetingsResource = class {
|
|
|
669
698
|
}
|
|
670
699
|
/**
|
|
671
700
|
* Get meeting recording assets and transcript.
|
|
701
|
+
* Requires one of: `meeting:find` (least privilege) or `meeting:manage`.
|
|
672
702
|
*
|
|
673
703
|
* @example
|
|
674
704
|
* const recording = await workast.meetings.retrieveRecording('meeting-id');
|
|
@@ -683,6 +713,7 @@ var MeetingsResource = class {
|
|
|
683
713
|
}
|
|
684
714
|
/**
|
|
685
715
|
* Enable the notetaker for a meeting.
|
|
716
|
+
* Requires `meeting:manage`.
|
|
686
717
|
*
|
|
687
718
|
* @example
|
|
688
719
|
* const meeting = await workast.meetings.enableNotetaker('meeting-id', {
|
|
@@ -699,6 +730,7 @@ var MeetingsResource = class {
|
|
|
699
730
|
}
|
|
700
731
|
/**
|
|
701
732
|
* Disable or remove the notetaker from a meeting.
|
|
733
|
+
* Requires `meeting:manage`.
|
|
702
734
|
*
|
|
703
735
|
* @example
|
|
704
736
|
* const meeting = await workast.meetings.disableNotetaker('meeting-id');
|
|
@@ -721,6 +753,7 @@ var NotesResource = class {
|
|
|
721
753
|
client;
|
|
722
754
|
/**
|
|
723
755
|
* List notes.
|
|
756
|
+
* Requires one of: `note:find` (least privilege) or `note:manage`.
|
|
724
757
|
*
|
|
725
758
|
* @example
|
|
726
759
|
* const results = await workast.notes.list({ title: 'Spec', limit: 10 });
|
|
@@ -761,6 +794,7 @@ var NotesResource = class {
|
|
|
761
794
|
}
|
|
762
795
|
/**
|
|
763
796
|
* Get a note by ID.
|
|
797
|
+
* Requires one of: `note:find` (least privilege) or `note:manage`.
|
|
764
798
|
*
|
|
765
799
|
* @example
|
|
766
800
|
* const note = await workast.notes.retrieve('note-id');
|
|
@@ -770,6 +804,7 @@ var NotesResource = class {
|
|
|
770
804
|
}
|
|
771
805
|
/**
|
|
772
806
|
* Update a note.
|
|
807
|
+
* Requires one of: `note:update` (least privilege) or `note:manage`.
|
|
773
808
|
*
|
|
774
809
|
* @example
|
|
775
810
|
* const note = await workast.notes.update('note-id', { title: 'Spec', version: 1, body: '<p>Hello</p>' });
|
|
@@ -779,6 +814,7 @@ var NotesResource = class {
|
|
|
779
814
|
}
|
|
780
815
|
/**
|
|
781
816
|
* Delete a note.
|
|
817
|
+
* Requires `note:manage`.
|
|
782
818
|
*
|
|
783
819
|
* @example
|
|
784
820
|
* await workast.notes.del('note-id');
|
|
@@ -796,6 +832,7 @@ var NotificationsResource = class {
|
|
|
796
832
|
client;
|
|
797
833
|
/**
|
|
798
834
|
* List notifications for the logged-in user.
|
|
835
|
+
* Requires one of: `notification:find` (least privilege) or `notification:manage`.
|
|
799
836
|
*
|
|
800
837
|
* @example
|
|
801
838
|
* const results = await workast.notifications.list({ read: false, limit: 10 });
|
|
@@ -823,6 +860,7 @@ var NotificationsResource = class {
|
|
|
823
860
|
}
|
|
824
861
|
/**
|
|
825
862
|
* Mark a notification as read.
|
|
863
|
+
* Requires `notification:manage`.
|
|
826
864
|
*
|
|
827
865
|
* @example
|
|
828
866
|
* await workast.notifications.markRead('notification-id');
|
|
@@ -837,6 +875,7 @@ var NotificationsResource = class {
|
|
|
837
875
|
}
|
|
838
876
|
/**
|
|
839
877
|
* Mark a notification as unread.
|
|
878
|
+
* Requires `notification:manage`.
|
|
840
879
|
*
|
|
841
880
|
* @example
|
|
842
881
|
* await workast.notifications.markUnread('notification-id');
|
|
@@ -859,6 +898,7 @@ var Reactions = class {
|
|
|
859
898
|
client;
|
|
860
899
|
/**
|
|
861
900
|
* Add a reaction to an activity.
|
|
901
|
+
* Requires one of: `activity:react` (least privilege) or `task:manage`.
|
|
862
902
|
*
|
|
863
903
|
* @example
|
|
864
904
|
* const reaction = await workast.reactions.add('activity-id', { emoji: ':+1:' });
|
|
@@ -873,6 +913,7 @@ var Reactions = class {
|
|
|
873
913
|
}
|
|
874
914
|
/**
|
|
875
915
|
* Remove a reaction from an activity.
|
|
916
|
+
* Requires one of: `activity:react` (least privilege) or `task:manage`.
|
|
876
917
|
*
|
|
877
918
|
* @example
|
|
878
919
|
* await workast.reactions.del('activity-id', 'reaction-id');
|
|
@@ -895,9 +936,10 @@ var SearchesResource = class {
|
|
|
895
936
|
client;
|
|
896
937
|
/**
|
|
897
938
|
* List searches for the logged-in user.
|
|
939
|
+
* Requires one of: `search:find` (least privilege) or `search:manage`.
|
|
898
940
|
*
|
|
899
941
|
* @example
|
|
900
|
-
* const results = await workast.searches.list({
|
|
942
|
+
* const results = await workast.searches.list({ limit: 10 });
|
|
901
943
|
*/
|
|
902
944
|
list(query, options) {
|
|
903
945
|
const params = new URLSearchParams(options?.query);
|
|
@@ -910,9 +952,6 @@ var SearchesResource = class {
|
|
|
910
952
|
if (query?.sort) {
|
|
911
953
|
params.set("sort", query.sort);
|
|
912
954
|
}
|
|
913
|
-
if (query?.home != null) {
|
|
914
|
-
params.set("home", String(query.home));
|
|
915
|
-
}
|
|
916
955
|
return this.client.request(
|
|
917
956
|
"GET",
|
|
918
957
|
"/search",
|
|
@@ -922,6 +961,7 @@ var SearchesResource = class {
|
|
|
922
961
|
}
|
|
923
962
|
/**
|
|
924
963
|
* Create a search.
|
|
964
|
+
* Requires `search:manage`.
|
|
925
965
|
*
|
|
926
966
|
* @example
|
|
927
967
|
* const search = await workast.searches.create({
|
|
@@ -934,6 +974,7 @@ var SearchesResource = class {
|
|
|
934
974
|
}
|
|
935
975
|
/**
|
|
936
976
|
* Get a search by ID.
|
|
977
|
+
* Requires one of: `search:find` (least privilege) or `search:manage`.
|
|
937
978
|
*
|
|
938
979
|
* @example
|
|
939
980
|
* const search = await workast.searches.retrieve('search-id');
|
|
@@ -957,6 +998,7 @@ var SearchesResource = class {
|
|
|
957
998
|
}
|
|
958
999
|
/**
|
|
959
1000
|
* Update a search.
|
|
1001
|
+
* Requires `search:manage`.
|
|
960
1002
|
*
|
|
961
1003
|
* @example
|
|
962
1004
|
* const search = await workast.searches.update('search-id', { name: 'Updated' });
|
|
@@ -971,6 +1013,7 @@ var SearchesResource = class {
|
|
|
971
1013
|
}
|
|
972
1014
|
/**
|
|
973
1015
|
* Delete a search.
|
|
1016
|
+
* Requires `search:manage`.
|
|
974
1017
|
*
|
|
975
1018
|
* @example
|
|
976
1019
|
* await workast.searches.del('search-id');
|
|
@@ -983,8 +1026,31 @@ var SearchesResource = class {
|
|
|
983
1026
|
options
|
|
984
1027
|
);
|
|
985
1028
|
}
|
|
1029
|
+
/**
|
|
1030
|
+
* List searches pinned on the home screen.
|
|
1031
|
+
* Requires one of: `home:search:find` (least privilege) or `home:search:manage`.
|
|
1032
|
+
*
|
|
1033
|
+
* @example
|
|
1034
|
+
* const results = await workast.searches.listHome({ limit: 10 });
|
|
1035
|
+
*/
|
|
1036
|
+
listHome(query, options) {
|
|
1037
|
+
const params = new URLSearchParams(options?.query);
|
|
1038
|
+
if (query?.limit != null) {
|
|
1039
|
+
params.set("limit", String(query.limit));
|
|
1040
|
+
}
|
|
1041
|
+
if (query?.skip != null) {
|
|
1042
|
+
params.set("skip", String(query.skip));
|
|
1043
|
+
}
|
|
1044
|
+
return this.client.request(
|
|
1045
|
+
"GET",
|
|
1046
|
+
"/search/home",
|
|
1047
|
+
void 0,
|
|
1048
|
+
params.toString() ? { ...options, query: params } : options
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
986
1051
|
/**
|
|
987
1052
|
* Add a search to the home screen.
|
|
1053
|
+
* Requires `home:search:manage`.
|
|
988
1054
|
*
|
|
989
1055
|
* @example
|
|
990
1056
|
* await workast.searches.addHome('search-id');
|
|
@@ -999,6 +1065,7 @@ var SearchesResource = class {
|
|
|
999
1065
|
}
|
|
1000
1066
|
/**
|
|
1001
1067
|
* Remove a search from the home screen.
|
|
1068
|
+
* Requires `home:search:manage`.
|
|
1002
1069
|
*
|
|
1003
1070
|
* @example
|
|
1004
1071
|
* await workast.searches.removeHome('search-id');
|
|
@@ -1013,6 +1080,7 @@ var SearchesResource = class {
|
|
|
1013
1080
|
}
|
|
1014
1081
|
/**
|
|
1015
1082
|
* Share a search with users.
|
|
1083
|
+
* Requires `search:manage`.
|
|
1016
1084
|
*
|
|
1017
1085
|
* @example
|
|
1018
1086
|
* await workast.searches.share('search-id', { users: ['user-id'] });
|
|
@@ -1027,6 +1095,7 @@ var SearchesResource = class {
|
|
|
1027
1095
|
}
|
|
1028
1096
|
/**
|
|
1029
1097
|
* Unshare a search from users.
|
|
1098
|
+
* Requires `search:manage`.
|
|
1030
1099
|
*
|
|
1031
1100
|
* @example
|
|
1032
1101
|
* await workast.searches.unshare('search-id', { users: ['user-id'] });
|
|
@@ -1041,6 +1110,7 @@ var SearchesResource = class {
|
|
|
1041
1110
|
}
|
|
1042
1111
|
/**
|
|
1043
1112
|
* Set a reminder on a search.
|
|
1113
|
+
* Requires `search:manage`.
|
|
1044
1114
|
*
|
|
1045
1115
|
* @example
|
|
1046
1116
|
* await workast.searches.setReminder('search-id', {
|
|
@@ -1057,6 +1127,7 @@ var SearchesResource = class {
|
|
|
1057
1127
|
}
|
|
1058
1128
|
/**
|
|
1059
1129
|
* Delete a reminder from a search.
|
|
1130
|
+
* Requires `search:manage`.
|
|
1060
1131
|
*
|
|
1061
1132
|
* @example
|
|
1062
1133
|
* await workast.searches.delReminder('search-id');
|
|
@@ -1079,6 +1150,7 @@ var Tags = class {
|
|
|
1079
1150
|
client;
|
|
1080
1151
|
/**
|
|
1081
1152
|
* List tags in the team.
|
|
1153
|
+
* Requires one of: `tag:find` (least privilege) or `tag:manage`.
|
|
1082
1154
|
*
|
|
1083
1155
|
* @example
|
|
1084
1156
|
* const tags = await workast.tags.list({ listId: 'list-id' });
|
|
@@ -1100,6 +1172,7 @@ var Tags = class {
|
|
|
1100
1172
|
}
|
|
1101
1173
|
/**
|
|
1102
1174
|
* Create a tag.
|
|
1175
|
+
* Requires `tag:manage`.
|
|
1103
1176
|
*
|
|
1104
1177
|
* @example
|
|
1105
1178
|
* const tag = await workast.tags.create({ name: 'Priority', color: '#ff0000' });
|
|
@@ -1109,6 +1182,7 @@ var Tags = class {
|
|
|
1109
1182
|
}
|
|
1110
1183
|
/**
|
|
1111
1184
|
* Update a tag.
|
|
1185
|
+
* Requires `tag:manage`.
|
|
1112
1186
|
*
|
|
1113
1187
|
* @example
|
|
1114
1188
|
* const tag = await workast.tags.update('tag-id', { name: 'Priority' });
|
|
@@ -1123,6 +1197,7 @@ var Tags = class {
|
|
|
1123
1197
|
}
|
|
1124
1198
|
/**
|
|
1125
1199
|
* Delete a tag.
|
|
1200
|
+
* Requires `tag:manage`.
|
|
1126
1201
|
*
|
|
1127
1202
|
* @example
|
|
1128
1203
|
* await workast.tags.del('tag-id');
|
|
@@ -1145,6 +1220,7 @@ var TaskSubtasks = class {
|
|
|
1145
1220
|
client;
|
|
1146
1221
|
/**
|
|
1147
1222
|
* Create a subtask on a task.
|
|
1223
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1148
1224
|
*
|
|
1149
1225
|
* @example
|
|
1150
1226
|
* const subtask = await workast.tasks.subtasks.create('task-id', { text: 'Write tests' });
|
|
@@ -1160,6 +1236,7 @@ var TaskDependencies = class {
|
|
|
1160
1236
|
client;
|
|
1161
1237
|
/**
|
|
1162
1238
|
* Add a dependency to a task.
|
|
1239
|
+
* Requires one of: `task:manage:dependency` (least privilege) or `task:manage`.
|
|
1163
1240
|
*
|
|
1164
1241
|
* @example
|
|
1165
1242
|
* await workast.tasks.dependencies.add('task-id', 'dependency-id');
|
|
@@ -1174,6 +1251,7 @@ var TaskDependencies = class {
|
|
|
1174
1251
|
}
|
|
1175
1252
|
/**
|
|
1176
1253
|
* Remove a dependency from a task.
|
|
1254
|
+
* Requires one of: `task:manage:dependency` (least privilege) or `task:manage`.
|
|
1177
1255
|
*
|
|
1178
1256
|
* @example
|
|
1179
1257
|
* await workast.tasks.dependencies.del('task-id', 'dependency-id');
|
|
@@ -1194,6 +1272,7 @@ var TaskAttachments = class {
|
|
|
1194
1272
|
client;
|
|
1195
1273
|
/**
|
|
1196
1274
|
* Create an attachment on a task.
|
|
1275
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1197
1276
|
*
|
|
1198
1277
|
* @example
|
|
1199
1278
|
* const attachment = await workast.tasks.attachments.create('task-id', { author: 'user-id' });
|
|
@@ -1203,6 +1282,7 @@ var TaskAttachments = class {
|
|
|
1203
1282
|
}
|
|
1204
1283
|
/**
|
|
1205
1284
|
* Update a task attachment.
|
|
1285
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1206
1286
|
*
|
|
1207
1287
|
* @example
|
|
1208
1288
|
* const attachment = await workast.tasks.attachments.update('task-id', 'attachment-id', { date: '2026-01-01' });
|
|
@@ -1217,6 +1297,7 @@ var TaskAttachments = class {
|
|
|
1217
1297
|
}
|
|
1218
1298
|
/**
|
|
1219
1299
|
* Delete a task attachment.
|
|
1300
|
+
* Requires one of: `task:manage:attachment` (least privilege) or `task:manage`.
|
|
1220
1301
|
*
|
|
1221
1302
|
* @example
|
|
1222
1303
|
* await workast.tasks.attachments.del('task-id', 'attachment-id');
|
|
@@ -1237,6 +1318,7 @@ var TaskActivitiesResource = class {
|
|
|
1237
1318
|
client;
|
|
1238
1319
|
/**
|
|
1239
1320
|
* List activities on a task.
|
|
1321
|
+
* Requires one of: `task:activity:find` (least privilege) or `task:manage`.
|
|
1240
1322
|
*
|
|
1241
1323
|
* @example
|
|
1242
1324
|
* const results = await workast.tasks.activities.list('task-id', { type: ['comment'], limit: 10 });
|
|
@@ -1271,6 +1353,7 @@ var TaskActivitiesResource = class {
|
|
|
1271
1353
|
}
|
|
1272
1354
|
/**
|
|
1273
1355
|
* Create a comment activity on a task.
|
|
1356
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1274
1357
|
*
|
|
1275
1358
|
* @example
|
|
1276
1359
|
* const activity = await workast.tasks.activities.create('task-id', { type: 'comment', value: 'Looks good' });
|
|
@@ -1280,6 +1363,7 @@ var TaskActivitiesResource = class {
|
|
|
1280
1363
|
}
|
|
1281
1364
|
/**
|
|
1282
1365
|
* Update a task activity.
|
|
1366
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1283
1367
|
*
|
|
1284
1368
|
* @example
|
|
1285
1369
|
* await workast.tasks.activities.update('task-id', 'activity-id', { value: 'Updated comment' });
|
|
@@ -1294,6 +1378,7 @@ var TaskActivitiesResource = class {
|
|
|
1294
1378
|
}
|
|
1295
1379
|
/**
|
|
1296
1380
|
* Delete a task activity.
|
|
1381
|
+
* Requires one of: `task:manage:activity` (least privilege) or `task:manage`.
|
|
1297
1382
|
*
|
|
1298
1383
|
* @example
|
|
1299
1384
|
* await workast.tasks.activities.del('task-id', 'activity-id');
|
|
@@ -1322,6 +1407,7 @@ var Tasks = class {
|
|
|
1322
1407
|
activities;
|
|
1323
1408
|
/**
|
|
1324
1409
|
* Create a task in a list.
|
|
1410
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1325
1411
|
*
|
|
1326
1412
|
* @example
|
|
1327
1413
|
* const task = await workast.tasks.create('list-id', { text: 'Ship v3' });
|
|
@@ -1329,8 +1415,19 @@ var Tasks = class {
|
|
|
1329
1415
|
create(listId, body, options) {
|
|
1330
1416
|
return this.client.request("POST", `/list/${encodeURIComponent(listId)}/task`, body, options);
|
|
1331
1417
|
}
|
|
1418
|
+
/**
|
|
1419
|
+
* Create a task in the personal list.
|
|
1420
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1421
|
+
*
|
|
1422
|
+
* @example
|
|
1423
|
+
* const task = await workast.tasks.createPersonal({ text: 'Ship v3' });
|
|
1424
|
+
*/
|
|
1425
|
+
createPersonal(body, options) {
|
|
1426
|
+
return this.client.request("POST", "/list/personal/task", body, options);
|
|
1427
|
+
}
|
|
1332
1428
|
/**
|
|
1333
1429
|
* Get a task by ID.
|
|
1430
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1334
1431
|
*
|
|
1335
1432
|
* @example
|
|
1336
1433
|
* const task = await workast.tasks.retrieve('task-id');
|
|
@@ -1340,6 +1437,7 @@ var Tasks = class {
|
|
|
1340
1437
|
}
|
|
1341
1438
|
/**
|
|
1342
1439
|
* Get a task by short ID.
|
|
1440
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1343
1441
|
*
|
|
1344
1442
|
* @example
|
|
1345
1443
|
* const task = await workast.tasks.retrieveByShortId('t4k1');
|
|
@@ -1349,6 +1447,7 @@ var Tasks = class {
|
|
|
1349
1447
|
}
|
|
1350
1448
|
/**
|
|
1351
1449
|
* Update a task.
|
|
1450
|
+
* Requires `task:manage`.
|
|
1352
1451
|
*
|
|
1353
1452
|
* @example
|
|
1354
1453
|
* await workast.tasks.update('task-id', { text: 'Ship v3' });
|
|
@@ -1358,6 +1457,7 @@ var Tasks = class {
|
|
|
1358
1457
|
}
|
|
1359
1458
|
/**
|
|
1360
1459
|
* Delete a task.
|
|
1460
|
+
* Requires one of: `task:manage:remove` (least privilege) or `task:manage`.
|
|
1361
1461
|
*
|
|
1362
1462
|
* @example
|
|
1363
1463
|
* await workast.tasks.del('task-id');
|
|
@@ -1367,6 +1467,7 @@ var Tasks = class {
|
|
|
1367
1467
|
}
|
|
1368
1468
|
/**
|
|
1369
1469
|
* Search tasks.
|
|
1470
|
+
* Requires one of: `task:find` (least privilege) or `task:manage`.
|
|
1370
1471
|
*
|
|
1371
1472
|
* @example
|
|
1372
1473
|
* const results = await workast.tasks.list({
|
|
@@ -1378,6 +1479,7 @@ var Tasks = class {
|
|
|
1378
1479
|
}
|
|
1379
1480
|
/**
|
|
1380
1481
|
* Complete a task.
|
|
1482
|
+
* Requires one of: `task:manage:status` (least privilege) or `task:manage`.
|
|
1381
1483
|
*
|
|
1382
1484
|
* @example
|
|
1383
1485
|
* await workast.tasks.complete('task-id');
|
|
@@ -1387,6 +1489,7 @@ var Tasks = class {
|
|
|
1387
1489
|
}
|
|
1388
1490
|
/**
|
|
1389
1491
|
* Uncomplete a task.
|
|
1492
|
+
* Requires one of: `task:manage:status` (least privilege) or `task:manage`.
|
|
1390
1493
|
*
|
|
1391
1494
|
* @example
|
|
1392
1495
|
* await workast.tasks.uncomplete('task-id');
|
|
@@ -1396,6 +1499,7 @@ var Tasks = class {
|
|
|
1396
1499
|
}
|
|
1397
1500
|
/**
|
|
1398
1501
|
* Assign users to a task.
|
|
1502
|
+
* Requires one of: `task:manage:assignee` (least privilege) or `task:manage`.
|
|
1399
1503
|
*
|
|
1400
1504
|
* @example
|
|
1401
1505
|
* await workast.tasks.assign('task-id', { users: ['user-id'] });
|
|
@@ -1405,6 +1509,7 @@ var Tasks = class {
|
|
|
1405
1509
|
}
|
|
1406
1510
|
/**
|
|
1407
1511
|
* Unassign users from a task.
|
|
1512
|
+
* Requires one of: `task:manage:assignee` (least privilege) or `task:manage`.
|
|
1408
1513
|
*
|
|
1409
1514
|
* @example
|
|
1410
1515
|
* await workast.tasks.unassign('task-id', { users: ['user-id'] });
|
|
@@ -1414,6 +1519,7 @@ var Tasks = class {
|
|
|
1414
1519
|
}
|
|
1415
1520
|
/**
|
|
1416
1521
|
* Add followers to a task.
|
|
1522
|
+
* Requires `user:task:follow`.
|
|
1417
1523
|
*
|
|
1418
1524
|
* @example
|
|
1419
1525
|
* await workast.tasks.follow('task-id', { users: ['user-id'] });
|
|
@@ -1423,6 +1529,7 @@ var Tasks = class {
|
|
|
1423
1529
|
}
|
|
1424
1530
|
/**
|
|
1425
1531
|
* Remove followers from a task.
|
|
1532
|
+
* Requires `user:task:follow`.
|
|
1426
1533
|
*
|
|
1427
1534
|
* @example
|
|
1428
1535
|
* await workast.tasks.unfollow('task-id', { users: ['user-id'] });
|
|
@@ -1432,6 +1539,7 @@ var Tasks = class {
|
|
|
1432
1539
|
}
|
|
1433
1540
|
/**
|
|
1434
1541
|
* Move tasks to another list.
|
|
1542
|
+
* Requires one of: `task:manage:move` (least privilege) or `task:manage`.
|
|
1435
1543
|
*
|
|
1436
1544
|
* @example
|
|
1437
1545
|
* await workast.tasks.move('list-id', { tasks: ['task-id'], target: 'other-list-id' });
|
|
@@ -1441,6 +1549,7 @@ var Tasks = class {
|
|
|
1441
1549
|
}
|
|
1442
1550
|
/**
|
|
1443
1551
|
* Create many tasks in a list.
|
|
1552
|
+
* Requires one of: `task:create` (least privilege) or `task:manage`.
|
|
1444
1553
|
*
|
|
1445
1554
|
* @example
|
|
1446
1555
|
* await workast.tasks.createMany('list-id', [{ text: 'One' }, { text: 'Two' }]);
|
|
@@ -1450,6 +1559,7 @@ var Tasks = class {
|
|
|
1450
1559
|
}
|
|
1451
1560
|
/**
|
|
1452
1561
|
* Update many tasks.
|
|
1562
|
+
* Requires `task:manage`.
|
|
1453
1563
|
*
|
|
1454
1564
|
* @example
|
|
1455
1565
|
* const result = await workast.tasks.updateMany({ tasks: ['task-id'], status: 'done' });
|
|
@@ -1459,6 +1569,7 @@ var Tasks = class {
|
|
|
1459
1569
|
}
|
|
1460
1570
|
/**
|
|
1461
1571
|
* List home (favourite) tasks.
|
|
1572
|
+
* Requires one of: `home:task:find` (least privilege) or `home:task:manage`.
|
|
1462
1573
|
*
|
|
1463
1574
|
* @example
|
|
1464
1575
|
* const home = await workast.tasks.listHome();
|
|
@@ -1468,6 +1579,7 @@ var Tasks = class {
|
|
|
1468
1579
|
}
|
|
1469
1580
|
/**
|
|
1470
1581
|
* Add a task to the home screen.
|
|
1582
|
+
* Requires `home:task:manage`.
|
|
1471
1583
|
*
|
|
1472
1584
|
* @example
|
|
1473
1585
|
* await workast.tasks.addHome('task-id');
|
|
@@ -1477,6 +1589,7 @@ var Tasks = class {
|
|
|
1477
1589
|
}
|
|
1478
1590
|
/**
|
|
1479
1591
|
* Remove a task from the home screen.
|
|
1592
|
+
* Requires `home:task:manage`.
|
|
1480
1593
|
*
|
|
1481
1594
|
* @example
|
|
1482
1595
|
* await workast.tasks.removeHome('task-id');
|
|
@@ -1486,6 +1599,7 @@ var Tasks = class {
|
|
|
1486
1599
|
}
|
|
1487
1600
|
/**
|
|
1488
1601
|
* Add tags to a task.
|
|
1602
|
+
* Requires one of: `task:manage:tag` (least privilege) or `task:manage`.
|
|
1489
1603
|
*
|
|
1490
1604
|
* @example
|
|
1491
1605
|
* await workast.tasks.addTag('task-id', { tags: ['tag-id'] });
|
|
@@ -1495,6 +1609,7 @@ var Tasks = class {
|
|
|
1495
1609
|
}
|
|
1496
1610
|
/**
|
|
1497
1611
|
* Remove tags from a task.
|
|
1612
|
+
* Requires one of: `task:manage:tag` (least privilege) or `task:manage`.
|
|
1498
1613
|
*
|
|
1499
1614
|
* @example
|
|
1500
1615
|
* await workast.tasks.removeTag('task-id', { tags: ['tag-id'] });
|
|
@@ -1504,6 +1619,7 @@ var Tasks = class {
|
|
|
1504
1619
|
}
|
|
1505
1620
|
/**
|
|
1506
1621
|
* Convert a task into a subtask of another task.
|
|
1622
|
+
* Requires `task:manage`.
|
|
1507
1623
|
*
|
|
1508
1624
|
* @example
|
|
1509
1625
|
* await workast.tasks.convertToSubtask('task-id', { parentTaskId: 'parent-id' });
|
|
@@ -1518,6 +1634,7 @@ var Tasks = class {
|
|
|
1518
1634
|
}
|
|
1519
1635
|
/**
|
|
1520
1636
|
* Convert a subtask into a standalone task.
|
|
1637
|
+
* Requires `task:manage`.
|
|
1521
1638
|
*
|
|
1522
1639
|
* @example
|
|
1523
1640
|
* const task = await workast.tasks.convertToTask('task-id');
|
|
@@ -1540,6 +1657,7 @@ var Tokens = class {
|
|
|
1540
1657
|
client;
|
|
1541
1658
|
/**
|
|
1542
1659
|
* Get the token details.
|
|
1660
|
+
* Requires any authenticated token (no specific scope).
|
|
1543
1661
|
*
|
|
1544
1662
|
* @example
|
|
1545
1663
|
* const token = await workast.tokens.retrieve();
|
|
@@ -1569,6 +1687,7 @@ var Users = class {
|
|
|
1569
1687
|
client;
|
|
1570
1688
|
/**
|
|
1571
1689
|
* Get the logged-in user.
|
|
1690
|
+
* Requires any authenticated token (no specific scope).
|
|
1572
1691
|
*
|
|
1573
1692
|
* @example
|
|
1574
1693
|
* const me = await workast.users.me();
|
|
@@ -1578,6 +1697,7 @@ var Users = class {
|
|
|
1578
1697
|
}
|
|
1579
1698
|
/**
|
|
1580
1699
|
* List users in the team.
|
|
1700
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1581
1701
|
*
|
|
1582
1702
|
* @example
|
|
1583
1703
|
* const users = await workast.users.list({ name: 'Ada', limit: 10 });
|
|
@@ -1615,6 +1735,7 @@ var Users = class {
|
|
|
1615
1735
|
}
|
|
1616
1736
|
/**
|
|
1617
1737
|
* Get a user by ID.
|
|
1738
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1618
1739
|
*
|
|
1619
1740
|
* @example
|
|
1620
1741
|
* const user = await workast.users.retrieve('user-id');
|
|
@@ -1624,6 +1745,7 @@ var Users = class {
|
|
|
1624
1745
|
}
|
|
1625
1746
|
/**
|
|
1626
1747
|
* Get a user by email.
|
|
1748
|
+
* Requires one of: `user:find` (least privilege) or `user:manage`.
|
|
1627
1749
|
*
|
|
1628
1750
|
* @example
|
|
1629
1751
|
* const user = await workast.users.retrieveByEmail('ada@example.com');
|
|
@@ -1642,6 +1764,7 @@ var Users = class {
|
|
|
1642
1764
|
}
|
|
1643
1765
|
/**
|
|
1644
1766
|
* Invite a user to the team.
|
|
1767
|
+
* Requires one of: `user:invite` (least privilege) or `user:manage`.
|
|
1645
1768
|
*
|
|
1646
1769
|
* @example
|
|
1647
1770
|
* const user = await workast.users.invite({ name: 'Ada', email: 'ada@example.com', role: 'member' });
|
|
@@ -1669,6 +1792,7 @@ var WorkflowsResource = class {
|
|
|
1669
1792
|
client;
|
|
1670
1793
|
/**
|
|
1671
1794
|
* List workflows created by the logged-in user.
|
|
1795
|
+
* Requires one of: `workflow:find` (least privilege) or `workflow:manage`.
|
|
1672
1796
|
*
|
|
1673
1797
|
* @example
|
|
1674
1798
|
* const results = await workast.workflows.list({ limit: 10, skip: 0 });
|
|
@@ -1678,6 +1802,7 @@ var WorkflowsResource = class {
|
|
|
1678
1802
|
}
|
|
1679
1803
|
/**
|
|
1680
1804
|
* Create a workflow.
|
|
1805
|
+
* Requires `workflow:manage`.
|
|
1681
1806
|
*
|
|
1682
1807
|
* @example
|
|
1683
1808
|
* const workflow = await workast.workflows.create({
|
|
@@ -1692,6 +1817,7 @@ var WorkflowsResource = class {
|
|
|
1692
1817
|
}
|
|
1693
1818
|
/**
|
|
1694
1819
|
* Get a workflow by ID.
|
|
1820
|
+
* Requires one of: `workflow:find` (least privilege) or `workflow:manage`.
|
|
1695
1821
|
*
|
|
1696
1822
|
* @example
|
|
1697
1823
|
* const workflow = await workast.workflows.retrieve('workflow-id');
|
|
@@ -1706,6 +1832,7 @@ var WorkflowsResource = class {
|
|
|
1706
1832
|
}
|
|
1707
1833
|
/**
|
|
1708
1834
|
* Update a workflow.
|
|
1835
|
+
* Requires `workflow:manage`.
|
|
1709
1836
|
*
|
|
1710
1837
|
* @example
|
|
1711
1838
|
* await workast.workflows.update('workflow-id', { prompt: 'Ship v3' });
|
|
@@ -1720,6 +1847,7 @@ var WorkflowsResource = class {
|
|
|
1720
1847
|
}
|
|
1721
1848
|
/**
|
|
1722
1849
|
* Delete a workflow.
|
|
1850
|
+
* Requires `workflow:manage`.
|
|
1723
1851
|
*
|
|
1724
1852
|
* @example
|
|
1725
1853
|
* await workast.workflows.del('workflow-id');
|
|
@@ -1734,6 +1862,7 @@ var WorkflowsResource = class {
|
|
|
1734
1862
|
}
|
|
1735
1863
|
/**
|
|
1736
1864
|
* Activate a workflow.
|
|
1865
|
+
* Requires `workflow:manage`.
|
|
1737
1866
|
*
|
|
1738
1867
|
* @example
|
|
1739
1868
|
* await workast.workflows.activate('workflow-id');
|
|
@@ -1748,6 +1877,7 @@ var WorkflowsResource = class {
|
|
|
1748
1877
|
}
|
|
1749
1878
|
/**
|
|
1750
1879
|
* Deactivate a workflow.
|
|
1880
|
+
* Requires `workflow:manage`.
|
|
1751
1881
|
*
|
|
1752
1882
|
* @example
|
|
1753
1883
|
* await workast.workflows.deactivate('workflow-id');
|