@workast/sdk 2.3.0 → 3.1.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/mock.cjs ADDED
@@ -0,0 +1,4591 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/mock.ts
21
+ var mock_exports = {};
22
+ __export(mock_exports, {
23
+ errors: () => errors,
24
+ examples: () => examples_exports,
25
+ mockWorkast: () => mockWorkast
26
+ });
27
+ module.exports = __toCommonJS(mock_exports);
28
+
29
+ // src/errors.ts
30
+ var ApiError = class extends Error {
31
+ status;
32
+ body;
33
+ constructor(message, status, body) {
34
+ super(message);
35
+ this.name = "ApiError";
36
+ this.status = status;
37
+ this.body = body;
38
+ }
39
+ };
40
+ var AuthenticationError = class extends ApiError {
41
+ constructor(message, status = 401, body) {
42
+ super(message, status, body);
43
+ this.name = "AuthenticationError";
44
+ }
45
+ };
46
+ var PermissionError = class extends ApiError {
47
+ constructor(message, status = 403, body) {
48
+ super(message, status, body);
49
+ this.name = "PermissionError";
50
+ }
51
+ };
52
+ var NotFoundError = class extends ApiError {
53
+ constructor(message, status = 404, body) {
54
+ super(message, status, body);
55
+ this.name = "NotFoundError";
56
+ }
57
+ };
58
+ var ValidationError = class extends ApiError {
59
+ constructor(message, status = 400, body) {
60
+ super(message, status, body);
61
+ this.name = "ValidationError";
62
+ }
63
+ };
64
+ function errorFromResponse(status, body) {
65
+ const message = messageFromBody(body) ?? `Request failed with status ${status}`;
66
+ switch (status) {
67
+ case 400:
68
+ return new ValidationError(message, status, body);
69
+ case 401:
70
+ return new AuthenticationError(message, status, body);
71
+ case 403:
72
+ return new PermissionError(message, status, body);
73
+ case 404:
74
+ return new NotFoundError(message, status, body);
75
+ default:
76
+ return new ApiError(message, status, body);
77
+ }
78
+ }
79
+ function messageFromBody(body) {
80
+ if (!body || typeof body !== "object") {
81
+ return void 0;
82
+ }
83
+ const { error, message } = body;
84
+ if (typeof error === "string") {
85
+ return typeof message === "string" ? message : error;
86
+ }
87
+ if (error && typeof error === "object") {
88
+ const nested = error;
89
+ if (typeof nested.message === "string") {
90
+ return nested.message;
91
+ }
92
+ }
93
+ if (typeof message === "string") {
94
+ return message;
95
+ }
96
+ return void 0;
97
+ }
98
+
99
+ // src/request.ts
100
+ function withoutAuthorization(headers = {}) {
101
+ const next = {};
102
+ for (const [key, value] of Object.entries(headers)) {
103
+ if (key.toLowerCase() !== "authorization") {
104
+ next[key] = value;
105
+ }
106
+ }
107
+ return next;
108
+ }
109
+ async function request(ctx, method, path, body, options) {
110
+ const token = await ctx.resolveAuth();
111
+ const headers = {
112
+ ...body !== void 0 ? { "Content-Type": "application/json" } : {},
113
+ ...ctx.headers,
114
+ ...withoutAuthorization(options?.headers),
115
+ Authorization: `Bearer ${token}`
116
+ };
117
+ let url = `${ctx.baseUrl.replace(/\/$/, "")}${path}`;
118
+ const qs = options?.query?.toString();
119
+ if (qs) {
120
+ url += `?${qs}`;
121
+ }
122
+ const response = await ctx.fetch(url, {
123
+ method,
124
+ headers,
125
+ body: body !== void 0 ? JSON.stringify(body) : void 0
126
+ });
127
+ if (!response.ok) {
128
+ let errorBody;
129
+ try {
130
+ errorBody = await response.json();
131
+ } catch {
132
+ errorBody = void 0;
133
+ }
134
+ throw errorFromResponse(response.status, errorBody);
135
+ }
136
+ if (response.status === 204) {
137
+ return void 0;
138
+ }
139
+ const text = await response.text();
140
+ if (!text) {
141
+ return void 0;
142
+ }
143
+ return JSON.parse(text);
144
+ }
145
+
146
+ // src/resources/attachments.ts
147
+ var Attachments = class {
148
+ constructor(client) {
149
+ this.client = client;
150
+ }
151
+ client;
152
+ /**
153
+ * Get a signed URL to download an attachment file.
154
+ *
155
+ * @example
156
+ * const attachment = await workast.attachments.retrieveFileUrl('attachment-id');
157
+ */
158
+ retrieveFileUrl(attachmentId, query, options) {
159
+ const params = new URLSearchParams(options?.query);
160
+ if (query?.download != null) {
161
+ params.set("download", String(query.download));
162
+ }
163
+ return this.client.request(
164
+ "GET",
165
+ `/attachment/${encodeURIComponent(attachmentId)}/file`,
166
+ void 0,
167
+ params.toString() ? { ...options, query: params } : options
168
+ );
169
+ }
170
+ };
171
+
172
+ // src/resources/calendar.ts
173
+ var CalendarEventsResource = class {
174
+ constructor(client) {
175
+ this.client = client;
176
+ }
177
+ client;
178
+ /**
179
+ * List user calendar events.
180
+ *
181
+ * @example
182
+ * const results = await workast.calendar.events.list({ from: '2025-10-29', to: '2025-11-05' });
183
+ */
184
+ list(query, options) {
185
+ const params = new URLSearchParams(options?.query);
186
+ if (query?.from) {
187
+ params.set("from", query.from);
188
+ }
189
+ if (query?.to) {
190
+ params.set("to", query.to);
191
+ }
192
+ if (query?.tzid) {
193
+ params.set("tzid", query.tzid);
194
+ }
195
+ if (query?.attendees) {
196
+ for (const value of query.attendees) {
197
+ params.append("attendees", value);
198
+ }
199
+ }
200
+ return this.client.request(
201
+ "GET",
202
+ "/calendar/events",
203
+ void 0,
204
+ params.toString() ? { ...options, query: params } : options
205
+ );
206
+ }
207
+ };
208
+ var CalendarResource = class {
209
+ events;
210
+ constructor(client) {
211
+ this.events = new CalendarEventsResource(client);
212
+ }
213
+ };
214
+
215
+ // src/resources/fields.ts
216
+ var Fields = class {
217
+ constructor(client) {
218
+ this.client = client;
219
+ }
220
+ client;
221
+ /**
222
+ * List custom fields in the team.
223
+ *
224
+ * @example
225
+ * const fields = await workast.fields.list({ listId: 'list-id' });
226
+ */
227
+ list(query, options) {
228
+ const params = new URLSearchParams(options?.query);
229
+ if (query?.listId) {
230
+ params.set("listId", query.listId);
231
+ }
232
+ return this.client.request(
233
+ "GET",
234
+ "/field",
235
+ void 0,
236
+ params.toString() ? { ...options, query: params } : options
237
+ );
238
+ }
239
+ /**
240
+ * Create a custom field.
241
+ *
242
+ * @example
243
+ * const field = await workast.fields.create({ name: 'Priority', type: 'text' });
244
+ */
245
+ create(body, options) {
246
+ return this.client.request("POST", "/field", body, options);
247
+ }
248
+ /**
249
+ * Update a custom field.
250
+ *
251
+ * @example
252
+ * const field = await workast.fields.update('field-id', { name: 'Priority' });
253
+ */
254
+ update(fieldId, body, options) {
255
+ return this.client.request(
256
+ "PUT",
257
+ `/field/${encodeURIComponent(fieldId)}`,
258
+ body,
259
+ options
260
+ );
261
+ }
262
+ /**
263
+ * Remove a custom field.
264
+ *
265
+ * @example
266
+ * await workast.fields.del('field-id');
267
+ */
268
+ del(fieldId, options) {
269
+ return this.client.request(
270
+ "DELETE",
271
+ `/field/${encodeURIComponent(fieldId)}`,
272
+ void 0,
273
+ options
274
+ );
275
+ }
276
+ };
277
+
278
+ // src/resources/lists.ts
279
+ var ListSublists = class {
280
+ constructor(client) {
281
+ this.client = client;
282
+ }
283
+ client;
284
+ /**
285
+ * List unique sublist names across lists.
286
+ *
287
+ * @example
288
+ * const names = await workast.lists.sublists.list({ types: ['group'] });
289
+ */
290
+ list(query, options) {
291
+ const params = new URLSearchParams(options?.query);
292
+ if (query?.onlyUserLists != null) {
293
+ params.set("onlyUserLists", String(query.onlyUserLists));
294
+ }
295
+ if (query?.types) {
296
+ for (const value of query.types) {
297
+ params.append("types", value);
298
+ }
299
+ }
300
+ return this.client.request(
301
+ "GET",
302
+ "/list/sublists",
303
+ void 0,
304
+ params.toString() ? { ...options, query: params } : options
305
+ );
306
+ }
307
+ /**
308
+ * Create a sublist in a list.
309
+ *
310
+ * @example
311
+ * const sublist = await workast.lists.sublists.create('list-id', { name: 'To-do' });
312
+ */
313
+ create(listId, body, options) {
314
+ return this.client.request(
315
+ "POST",
316
+ `/list/${encodeURIComponent(listId)}/sublist`,
317
+ body,
318
+ options
319
+ );
320
+ }
321
+ /**
322
+ * Update a sublist.
323
+ *
324
+ * @example
325
+ * await workast.lists.sublists.update('list-id', 'sublist-id', { name: 'Done' });
326
+ */
327
+ update(listId, subListId, body, options) {
328
+ return this.client.request(
329
+ "PATCH",
330
+ `/list/${encodeURIComponent(listId)}/sublist/${encodeURIComponent(subListId)}`,
331
+ body,
332
+ options
333
+ );
334
+ }
335
+ /**
336
+ * Remove a sublist.
337
+ *
338
+ * @example
339
+ * await workast.lists.sublists.del('list-id', 'sublist-id');
340
+ */
341
+ del(listId, subListId, options) {
342
+ return this.client.request(
343
+ "DELETE",
344
+ `/list/${encodeURIComponent(listId)}/sublist/${encodeURIComponent(subListId)}`,
345
+ void 0,
346
+ options
347
+ );
348
+ }
349
+ };
350
+ var ListParticipantsResource = class {
351
+ constructor(client) {
352
+ this.client = client;
353
+ }
354
+ client;
355
+ /**
356
+ * List participants on a list.
357
+ *
358
+ * @example
359
+ * const users = await workast.lists.participants.list('list-id');
360
+ */
361
+ list(listId, options) {
362
+ return this.client.request(
363
+ "GET",
364
+ `/list/${encodeURIComponent(listId)}/participant`,
365
+ void 0,
366
+ options
367
+ );
368
+ }
369
+ /**
370
+ * Add participants to a list.
371
+ *
372
+ * @example
373
+ * await workast.lists.participants.add('list-id', { users: ['user-id'] });
374
+ */
375
+ add(listId, body, options) {
376
+ return this.client.request(
377
+ "POST",
378
+ `/list/${encodeURIComponent(listId)}/participant`,
379
+ body,
380
+ options
381
+ );
382
+ }
383
+ /**
384
+ * Remove participants from a list.
385
+ *
386
+ * @example
387
+ * await workast.lists.participants.del('list-id', { users: ['user-id'] });
388
+ */
389
+ del(listId, body, options) {
390
+ return this.client.request(
391
+ "DELETE",
392
+ `/list/${encodeURIComponent(listId)}/participant`,
393
+ body,
394
+ options
395
+ );
396
+ }
397
+ };
398
+ var ListFields = class {
399
+ constructor(client) {
400
+ this.client = client;
401
+ }
402
+ client;
403
+ /**
404
+ * Enable a custom field on a list.
405
+ *
406
+ * @example
407
+ * await workast.lists.fields.enable('list-id', 'field-id');
408
+ */
409
+ enable(listId, fieldId, options) {
410
+ return this.client.request(
411
+ "POST",
412
+ `/list/${encodeURIComponent(listId)}/field/${encodeURIComponent(fieldId)}`,
413
+ void 0,
414
+ options
415
+ );
416
+ }
417
+ /**
418
+ * Disable a custom field on a list.
419
+ *
420
+ * @example
421
+ * await workast.lists.fields.disable('list-id', 'field-id');
422
+ */
423
+ disable(listId, fieldId, options) {
424
+ return this.client.request(
425
+ "DELETE",
426
+ `/list/${encodeURIComponent(listId)}/field/${encodeURIComponent(fieldId)}`,
427
+ void 0,
428
+ options
429
+ );
430
+ }
431
+ };
432
+ var Lists = class {
433
+ constructor(client) {
434
+ this.client = client;
435
+ this.sublists = new ListSublists(client);
436
+ this.participants = new ListParticipantsResource(client);
437
+ this.fields = new ListFields(client);
438
+ }
439
+ client;
440
+ sublists;
441
+ participants;
442
+ fields;
443
+ /**
444
+ * Create a list.
445
+ *
446
+ * @example
447
+ * const list = await workast.lists.create({ name: 'Engineering' });
448
+ */
449
+ create(body, options) {
450
+ return this.client.request("POST", "/list", body, options);
451
+ }
452
+ /**
453
+ * Get a list by ID.
454
+ *
455
+ * @example
456
+ * const list = await workast.lists.retrieve('list-id');
457
+ */
458
+ retrieve(listId, options) {
459
+ return this.client.request("GET", `/list/${encodeURIComponent(listId)}`, void 0, options);
460
+ }
461
+ /**
462
+ * Update a list.
463
+ *
464
+ * @example
465
+ * await workast.lists.update('list-id', { name: 'Engineering' });
466
+ */
467
+ update(listId, body, options) {
468
+ return this.client.request("PATCH", `/list/${encodeURIComponent(listId)}`, body, options);
469
+ }
470
+ /**
471
+ * Search lists.
472
+ *
473
+ * @example
474
+ * const lists = await workast.lists.list({ type: 'group', limit: 10 });
475
+ */
476
+ list(query, options) {
477
+ const params = new URLSearchParams(options?.query);
478
+ if (query?.onlyUserLists != null) {
479
+ params.set("onlyUserLists", String(query.onlyUserLists));
480
+ }
481
+ if (query?.statusIs) {
482
+ params.set("statusIs", query.statusIs);
483
+ }
484
+ if (query?.includeTemplates != null) {
485
+ params.set("includeTemplates", String(query.includeTemplates));
486
+ }
487
+ if (query?.type) {
488
+ params.set("type", query.type);
489
+ }
490
+ if (query?.channelId) {
491
+ params.set("channelId", query.channelId);
492
+ }
493
+ if (query?.participants) {
494
+ for (const value of query.participants) {
495
+ params.append("participants", value);
496
+ }
497
+ }
498
+ if (query?.name) {
499
+ params.set("name", query.name);
500
+ }
501
+ if (query?.limit != null) {
502
+ params.set("limit", String(query.limit));
503
+ }
504
+ if (query?.skip != null) {
505
+ params.set("skip", String(query.skip));
506
+ }
507
+ if (query?.sort) {
508
+ params.set("sort", query.sort);
509
+ }
510
+ return this.client.request(
511
+ "GET",
512
+ "/list",
513
+ void 0,
514
+ params.toString() ? { ...options, query: params } : options
515
+ );
516
+ }
517
+ /**
518
+ * Get the personal list.
519
+ *
520
+ * @example
521
+ * const list = await workast.lists.retrievePersonal();
522
+ */
523
+ retrievePersonal(options) {
524
+ return this.client.request("GET", "/list/personal", void 0, options);
525
+ }
526
+ /**
527
+ * Archive a list.
528
+ *
529
+ * @example
530
+ * await workast.lists.archive('list-id');
531
+ */
532
+ archive(listId, options) {
533
+ return this.client.request(
534
+ "POST",
535
+ `/list/${encodeURIComponent(listId)}/archive`,
536
+ void 0,
537
+ options
538
+ );
539
+ }
540
+ /**
541
+ * Unarchive a list.
542
+ *
543
+ * @example
544
+ * await workast.lists.unarchive('list-id');
545
+ */
546
+ unarchive(listId, options) {
547
+ return this.client.request(
548
+ "POST",
549
+ `/list/${encodeURIComponent(listId)}/unarchive`,
550
+ void 0,
551
+ options
552
+ );
553
+ }
554
+ /**
555
+ * Join a list.
556
+ *
557
+ * @example
558
+ * await workast.lists.join('list-id');
559
+ */
560
+ join(listId, options) {
561
+ return this.client.request(
562
+ "POST",
563
+ `/list/${encodeURIComponent(listId)}/participant/join`,
564
+ void 0,
565
+ options
566
+ );
567
+ }
568
+ /**
569
+ * Request access to a private list.
570
+ *
571
+ * @example
572
+ * await workast.lists.requestAccess('list-id');
573
+ */
574
+ requestAccess(listId, options) {
575
+ return this.client.request(
576
+ "POST",
577
+ `/list/${encodeURIComponent(listId)}/participant/request`,
578
+ void 0,
579
+ options
580
+ );
581
+ }
582
+ /**
583
+ * Import a template into a list.
584
+ *
585
+ * @example
586
+ * await workast.lists.importTemplate('list-id', 'template-id', { updateDueDates: 30 });
587
+ */
588
+ importTemplate(listId, templateId, body, options) {
589
+ return this.client.request(
590
+ "POST",
591
+ `/list/${encodeURIComponent(listId)}/import/${encodeURIComponent(templateId)}`,
592
+ body,
593
+ options
594
+ );
595
+ }
596
+ };
597
+
598
+ // src/resources/meetings.ts
599
+ var MeetingsResource = class {
600
+ constructor(client) {
601
+ this.client = client;
602
+ }
603
+ client;
604
+ /**
605
+ * List meetings.
606
+ *
607
+ * @example
608
+ * const results = await workast.meetings.list({ timeMin: '2026-01-01T00:00:00Z', maxResults: 15 });
609
+ */
610
+ list(query, options) {
611
+ const params = new URLSearchParams(options?.query);
612
+ if (query?.timeMin) {
613
+ params.set("timeMin", query.timeMin);
614
+ }
615
+ if (query?.timeMax) {
616
+ params.set("timeMax", query.timeMax);
617
+ }
618
+ if (query?.maxResults != null) {
619
+ params.set("maxResults", String(query.maxResults));
620
+ }
621
+ if (query?.pageToken) {
622
+ params.set("pageToken", query.pageToken);
623
+ }
624
+ if (query?.attendees) {
625
+ for (const value of query.attendees) {
626
+ params.append("attendees", value);
627
+ }
628
+ }
629
+ return this.client.request(
630
+ "GET",
631
+ "/meeting",
632
+ void 0,
633
+ params.toString() ? { ...options, query: params } : options
634
+ );
635
+ }
636
+ /**
637
+ * Create a meeting from a calendar event, or create a new calendar event.
638
+ *
639
+ * @example
640
+ * const meeting = await workast.meetings.createFromEvent({
641
+ * listId: 'list-id',
642
+ * summary: 'Standup',
643
+ * eventId: 'evt-1',
644
+ * });
645
+ */
646
+ createFromEvent(body, options) {
647
+ return this.client.request("POST", "/meeting", body, options);
648
+ }
649
+ /**
650
+ * Get a meeting by ID.
651
+ *
652
+ * @example
653
+ * const meeting = await workast.meetings.retrieve('meeting-id');
654
+ */
655
+ retrieve(meetingId, options) {
656
+ return this.client.request("GET", `/meeting/${encodeURIComponent(meetingId)}`, void 0, options);
657
+ }
658
+ /**
659
+ * Update meeting notes.
660
+ *
661
+ * @example
662
+ * const meeting = await workast.meetings.update('meeting-id', { notes: 'Ship v3' });
663
+ */
664
+ update(meetingId, body, options) {
665
+ return this.client.request("PATCH", `/meeting/${encodeURIComponent(meetingId)}`, body, options);
666
+ }
667
+ /**
668
+ * Get meeting recording assets and transcript.
669
+ *
670
+ * @example
671
+ * const recording = await workast.meetings.retrieveRecording('meeting-id');
672
+ */
673
+ retrieveRecording(meetingId, options) {
674
+ return this.client.request(
675
+ "GET",
676
+ `/meeting/${encodeURIComponent(meetingId)}/recording`,
677
+ void 0,
678
+ options
679
+ );
680
+ }
681
+ /**
682
+ * Enable the notetaker for a meeting.
683
+ *
684
+ * @example
685
+ * const meeting = await workast.meetings.enableNotetaker('meeting-id', {
686
+ * joinUrl: 'https://meet.example.com/abc',
687
+ * });
688
+ */
689
+ enableNotetaker(meetingId, body, options) {
690
+ return this.client.request(
691
+ "POST",
692
+ `/meeting/${encodeURIComponent(meetingId)}/notetaker`,
693
+ body,
694
+ options
695
+ );
696
+ }
697
+ /**
698
+ * Disable or remove the notetaker from a meeting.
699
+ *
700
+ * @example
701
+ * const meeting = await workast.meetings.disableNotetaker('meeting-id');
702
+ */
703
+ disableNotetaker(meetingId, options) {
704
+ return this.client.request(
705
+ "DELETE",
706
+ `/meeting/${encodeURIComponent(meetingId)}/notetaker`,
707
+ void 0,
708
+ options
709
+ );
710
+ }
711
+ };
712
+
713
+ // src/resources/notes.ts
714
+ var NotesResource = class {
715
+ constructor(client) {
716
+ this.client = client;
717
+ }
718
+ client;
719
+ /**
720
+ * List notes.
721
+ *
722
+ * @example
723
+ * const results = await workast.notes.list({ title: 'Spec', limit: 10 });
724
+ */
725
+ list(query, options) {
726
+ const params = new URLSearchParams(options?.query);
727
+ if (query?.showDeleted != null) {
728
+ params.set("showDeleted", String(query.showDeleted));
729
+ }
730
+ if (query?.lists) {
731
+ for (const value of query.lists) {
732
+ params.append("lists", value);
733
+ }
734
+ }
735
+ if (query?.title) {
736
+ params.set("title", query.title);
737
+ }
738
+ if (query?.owners) {
739
+ for (const value of query.owners) {
740
+ params.append("owners", value);
741
+ }
742
+ }
743
+ if (query?.sort) {
744
+ params.set("sort", query.sort);
745
+ }
746
+ if (query?.limit != null) {
747
+ params.set("limit", String(query.limit));
748
+ }
749
+ if (query?.skip != null) {
750
+ params.set("skip", String(query.skip));
751
+ }
752
+ return this.client.request(
753
+ "GET",
754
+ "/note",
755
+ void 0,
756
+ params.toString() ? { ...options, query: params } : options
757
+ );
758
+ }
759
+ /**
760
+ * Get a note by ID.
761
+ *
762
+ * @example
763
+ * const note = await workast.notes.retrieve('note-id');
764
+ */
765
+ retrieve(noteId, options) {
766
+ return this.client.request("GET", `/note/${encodeURIComponent(noteId)}`, void 0, options);
767
+ }
768
+ /**
769
+ * Update a note.
770
+ *
771
+ * @example
772
+ * const note = await workast.notes.update('note-id', { title: 'Spec', version: 1, body: '<p>Hello</p>' });
773
+ */
774
+ update(noteId, body, options) {
775
+ return this.client.request("PATCH", `/note/${encodeURIComponent(noteId)}`, body, options);
776
+ }
777
+ /**
778
+ * Delete a note.
779
+ *
780
+ * @example
781
+ * await workast.notes.del('note-id');
782
+ */
783
+ del(noteId, options) {
784
+ return this.client.request("DELETE", `/note/${encodeURIComponent(noteId)}`, void 0, options);
785
+ }
786
+ };
787
+
788
+ // src/resources/notifications.ts
789
+ var NotificationsResource = class {
790
+ constructor(client) {
791
+ this.client = client;
792
+ }
793
+ client;
794
+ /**
795
+ * List notifications for the logged-in user.
796
+ *
797
+ * @example
798
+ * const results = await workast.notifications.list({ read: false, limit: 10 });
799
+ */
800
+ list(query, options) {
801
+ const params = new URLSearchParams(options?.query);
802
+ if (query?.read != null) {
803
+ params.set("read", String(query.read));
804
+ }
805
+ if (query?.limit != null) {
806
+ params.set("limit", String(query.limit));
807
+ }
808
+ if (query?.skip != null) {
809
+ params.set("skip", String(query.skip));
810
+ }
811
+ if (query?.sort) {
812
+ params.set("sort", query.sort);
813
+ }
814
+ return this.client.request(
815
+ "GET",
816
+ "/notification",
817
+ void 0,
818
+ params.toString() ? { ...options, query: params } : options
819
+ );
820
+ }
821
+ /**
822
+ * Mark a notification as read.
823
+ *
824
+ * @example
825
+ * await workast.notifications.markRead('notification-id');
826
+ */
827
+ markRead(notificationId, options) {
828
+ return this.client.request(
829
+ "POST",
830
+ `/notification/${encodeURIComponent(notificationId)}/read`,
831
+ void 0,
832
+ options
833
+ );
834
+ }
835
+ /**
836
+ * Mark a notification as unread.
837
+ *
838
+ * @example
839
+ * await workast.notifications.markUnread('notification-id');
840
+ */
841
+ markUnread(notificationId, options) {
842
+ return this.client.request(
843
+ "POST",
844
+ `/notification/${encodeURIComponent(notificationId)}/unread`,
845
+ void 0,
846
+ options
847
+ );
848
+ }
849
+ };
850
+
851
+ // src/resources/reactions.ts
852
+ var Reactions = class {
853
+ constructor(client) {
854
+ this.client = client;
855
+ }
856
+ client;
857
+ /**
858
+ * Add a reaction to an activity.
859
+ *
860
+ * @example
861
+ * const reaction = await workast.reactions.add('activity-id', { emoji: ':+1:' });
862
+ */
863
+ add(activityId, body, options) {
864
+ return this.client.request(
865
+ "POST",
866
+ `/activity/${encodeURIComponent(activityId)}/reaction`,
867
+ body,
868
+ options
869
+ );
870
+ }
871
+ /**
872
+ * Remove a reaction from an activity.
873
+ *
874
+ * @example
875
+ * await workast.reactions.del('activity-id', 'reaction-id');
876
+ */
877
+ del(activityId, reactionId, options) {
878
+ return this.client.request(
879
+ "DELETE",
880
+ `/activity/${encodeURIComponent(activityId)}/reaction/${encodeURIComponent(reactionId)}`,
881
+ void 0,
882
+ options
883
+ );
884
+ }
885
+ };
886
+
887
+ // src/resources/searches.ts
888
+ var SearchesResource = class {
889
+ constructor(client) {
890
+ this.client = client;
891
+ }
892
+ client;
893
+ /**
894
+ * List searches for the logged-in user.
895
+ *
896
+ * @example
897
+ * const results = await workast.searches.list({ home: true, limit: 10 });
898
+ */
899
+ list(query, options) {
900
+ const params = new URLSearchParams(options?.query);
901
+ if (query?.limit != null) {
902
+ params.set("limit", String(query.limit));
903
+ }
904
+ if (query?.skip != null) {
905
+ params.set("skip", String(query.skip));
906
+ }
907
+ if (query?.sort) {
908
+ params.set("sort", query.sort);
909
+ }
910
+ if (query?.home != null) {
911
+ params.set("home", String(query.home));
912
+ }
913
+ return this.client.request(
914
+ "GET",
915
+ "/search",
916
+ void 0,
917
+ params.toString() ? { ...options, query: params } : options
918
+ );
919
+ }
920
+ /**
921
+ * Create a search.
922
+ *
923
+ * @example
924
+ * const search = await workast.searches.create({
925
+ * name: 'My tasks',
926
+ * payload: { predicates: [{ type: 'status', attribute: 'status', comparison: 'eq', value: 'pending' }] },
927
+ * });
928
+ */
929
+ create(body, options) {
930
+ return this.client.request("POST", "/search", body, options);
931
+ }
932
+ /**
933
+ * Get a search by ID.
934
+ *
935
+ * @example
936
+ * const search = await workast.searches.retrieve('search-id');
937
+ */
938
+ retrieve(searchId, query, options) {
939
+ const params = new URLSearchParams(options?.query);
940
+ if (query?.getTasks != null) {
941
+ params.set("getTasks", String(query.getTasks));
942
+ }
943
+ if (query?.expand) {
944
+ for (const value of query.expand) {
945
+ params.append("expand", value);
946
+ }
947
+ }
948
+ return this.client.request(
949
+ "GET",
950
+ `/search/${encodeURIComponent(searchId)}`,
951
+ void 0,
952
+ params.toString() ? { ...options, query: params } : options
953
+ );
954
+ }
955
+ /**
956
+ * Update a search.
957
+ *
958
+ * @example
959
+ * const search = await workast.searches.update('search-id', { name: 'Updated' });
960
+ */
961
+ update(searchId, body, options) {
962
+ return this.client.request(
963
+ "PATCH",
964
+ `/search/${encodeURIComponent(searchId)}`,
965
+ body,
966
+ options
967
+ );
968
+ }
969
+ /**
970
+ * Delete a search.
971
+ *
972
+ * @example
973
+ * await workast.searches.del('search-id');
974
+ */
975
+ del(searchId, options) {
976
+ return this.client.request(
977
+ "DELETE",
978
+ `/search/${encodeURIComponent(searchId)}`,
979
+ void 0,
980
+ options
981
+ );
982
+ }
983
+ /**
984
+ * Add a search to the home screen.
985
+ *
986
+ * @example
987
+ * await workast.searches.addHome('search-id');
988
+ */
989
+ addHome(searchId, options) {
990
+ return this.client.request(
991
+ "POST",
992
+ `/search/${encodeURIComponent(searchId)}/home`,
993
+ void 0,
994
+ options
995
+ );
996
+ }
997
+ /**
998
+ * Remove a search from the home screen.
999
+ *
1000
+ * @example
1001
+ * await workast.searches.removeHome('search-id');
1002
+ */
1003
+ removeHome(searchId, options) {
1004
+ return this.client.request(
1005
+ "DELETE",
1006
+ `/search/${encodeURIComponent(searchId)}/home`,
1007
+ void 0,
1008
+ options
1009
+ );
1010
+ }
1011
+ /**
1012
+ * Share a search with users.
1013
+ *
1014
+ * @example
1015
+ * await workast.searches.share('search-id', { users: ['user-id'] });
1016
+ */
1017
+ share(searchId, body, options) {
1018
+ return this.client.request(
1019
+ "POST",
1020
+ `/search/${encodeURIComponent(searchId)}/user`,
1021
+ body,
1022
+ options
1023
+ );
1024
+ }
1025
+ /**
1026
+ * Unshare a search from users.
1027
+ *
1028
+ * @example
1029
+ * await workast.searches.unshare('search-id', { users: ['user-id'] });
1030
+ */
1031
+ unshare(searchId, body, options) {
1032
+ return this.client.request(
1033
+ "DELETE",
1034
+ `/search/${encodeURIComponent(searchId)}/user`,
1035
+ body,
1036
+ options
1037
+ );
1038
+ }
1039
+ /**
1040
+ * Set a reminder on a search.
1041
+ *
1042
+ * @example
1043
+ * await workast.searches.setReminder('search-id', {
1044
+ * repeat: { freq: 'weekly', byhour: 9, byminute: 0 },
1045
+ * });
1046
+ */
1047
+ setReminder(searchId, body, options) {
1048
+ return this.client.request(
1049
+ "PUT",
1050
+ `/search/${encodeURIComponent(searchId)}/reminder`,
1051
+ body,
1052
+ options
1053
+ );
1054
+ }
1055
+ /**
1056
+ * Delete a reminder from a search.
1057
+ *
1058
+ * @example
1059
+ * await workast.searches.delReminder('search-id');
1060
+ */
1061
+ delReminder(searchId, options) {
1062
+ return this.client.request(
1063
+ "DELETE",
1064
+ `/search/${encodeURIComponent(searchId)}/reminder`,
1065
+ void 0,
1066
+ options
1067
+ );
1068
+ }
1069
+ };
1070
+
1071
+ // src/resources/tags.ts
1072
+ var Tags = class {
1073
+ constructor(client) {
1074
+ this.client = client;
1075
+ }
1076
+ client;
1077
+ /**
1078
+ * List tags in the team.
1079
+ *
1080
+ * @example
1081
+ * const tags = await workast.tags.list({ listId: 'list-id' });
1082
+ */
1083
+ list(query, options) {
1084
+ const params = new URLSearchParams(options?.query);
1085
+ if (query?.listId) {
1086
+ params.set("listId", query.listId);
1087
+ }
1088
+ if (query?.name) {
1089
+ params.set("name", query.name);
1090
+ }
1091
+ return this.client.request(
1092
+ "GET",
1093
+ "/tag",
1094
+ void 0,
1095
+ params.toString() ? { ...options, query: params } : options
1096
+ );
1097
+ }
1098
+ /**
1099
+ * Create a tag.
1100
+ *
1101
+ * @example
1102
+ * const tag = await workast.tags.create({ name: 'Priority', color: '#ff0000' });
1103
+ */
1104
+ create(body, options) {
1105
+ return this.client.request("POST", "/tag", body, options);
1106
+ }
1107
+ /**
1108
+ * Update a tag.
1109
+ *
1110
+ * @example
1111
+ * const tag = await workast.tags.update('tag-id', { name: 'Priority' });
1112
+ */
1113
+ update(tagId, body, options) {
1114
+ return this.client.request(
1115
+ "PATCH",
1116
+ `/tag/${encodeURIComponent(tagId)}`,
1117
+ body,
1118
+ options
1119
+ );
1120
+ }
1121
+ /**
1122
+ * Delete a tag.
1123
+ *
1124
+ * @example
1125
+ * await workast.tags.del('tag-id');
1126
+ */
1127
+ del(tagId, options) {
1128
+ return this.client.request(
1129
+ "DELETE",
1130
+ `/tag/${encodeURIComponent(tagId)}`,
1131
+ void 0,
1132
+ options
1133
+ );
1134
+ }
1135
+ };
1136
+
1137
+ // src/resources/tasks.ts
1138
+ var TaskSubtasks = class {
1139
+ constructor(client) {
1140
+ this.client = client;
1141
+ }
1142
+ client;
1143
+ /**
1144
+ * Create a subtask on a task.
1145
+ *
1146
+ * @example
1147
+ * const subtask = await workast.tasks.subtasks.create('task-id', { text: 'Write tests' });
1148
+ */
1149
+ create(taskId, body, options) {
1150
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/subtask`, body, options);
1151
+ }
1152
+ };
1153
+ var TaskDependencies = class {
1154
+ constructor(client) {
1155
+ this.client = client;
1156
+ }
1157
+ client;
1158
+ /**
1159
+ * Add a dependency to a task.
1160
+ *
1161
+ * @example
1162
+ * await workast.tasks.dependencies.add('task-id', 'dependency-id');
1163
+ */
1164
+ add(taskId, dependencyId, options) {
1165
+ return this.client.request(
1166
+ "POST",
1167
+ `/task/${encodeURIComponent(taskId)}/dependency/${encodeURIComponent(dependencyId)}`,
1168
+ void 0,
1169
+ options
1170
+ );
1171
+ }
1172
+ /**
1173
+ * Remove a dependency from a task.
1174
+ *
1175
+ * @example
1176
+ * await workast.tasks.dependencies.del('task-id', 'dependency-id');
1177
+ */
1178
+ del(taskId, dependencyId, options) {
1179
+ return this.client.request(
1180
+ "DELETE",
1181
+ `/task/${encodeURIComponent(taskId)}/dependency/${encodeURIComponent(dependencyId)}`,
1182
+ void 0,
1183
+ options
1184
+ );
1185
+ }
1186
+ };
1187
+ var TaskAttachments = class {
1188
+ constructor(client) {
1189
+ this.client = client;
1190
+ }
1191
+ client;
1192
+ /**
1193
+ * Create an attachment on a task.
1194
+ *
1195
+ * @example
1196
+ * const attachment = await workast.tasks.attachments.create('task-id', { author: 'user-id' });
1197
+ */
1198
+ create(taskId, body, options) {
1199
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/attachment`, body, options);
1200
+ }
1201
+ /**
1202
+ * Update a task attachment.
1203
+ *
1204
+ * @example
1205
+ * const attachment = await workast.tasks.attachments.update('task-id', 'attachment-id', { date: '2026-01-01' });
1206
+ */
1207
+ update(taskId, attachmentId, body, options) {
1208
+ return this.client.request(
1209
+ "PATCH",
1210
+ `/task/${encodeURIComponent(taskId)}/attachment/${encodeURIComponent(attachmentId)}`,
1211
+ body,
1212
+ options
1213
+ );
1214
+ }
1215
+ /**
1216
+ * Delete a task attachment.
1217
+ *
1218
+ * @example
1219
+ * await workast.tasks.attachments.del('task-id', 'attachment-id');
1220
+ */
1221
+ del(taskId, attachmentId, options) {
1222
+ return this.client.request(
1223
+ "DELETE",
1224
+ `/task/${encodeURIComponent(taskId)}/attachment/${encodeURIComponent(attachmentId)}`,
1225
+ void 0,
1226
+ options
1227
+ );
1228
+ }
1229
+ };
1230
+ var TaskActivitiesResource = class {
1231
+ constructor(client) {
1232
+ this.client = client;
1233
+ }
1234
+ client;
1235
+ /**
1236
+ * List activities on a task.
1237
+ *
1238
+ * @example
1239
+ * const results = await workast.tasks.activities.list('task-id', { type: ['comment'], limit: 10 });
1240
+ */
1241
+ list(taskId, query, options) {
1242
+ const params = new URLSearchParams(options?.query);
1243
+ if (query?.type) {
1244
+ for (const value of query.type) {
1245
+ params.append("type", value);
1246
+ }
1247
+ }
1248
+ if (query?.actorTypes) {
1249
+ for (const value of query.actorTypes) {
1250
+ params.append("actorTypes", value);
1251
+ }
1252
+ }
1253
+ if (query?.limit != null) {
1254
+ params.set("limit", String(query.limit));
1255
+ }
1256
+ if (query?.skip != null) {
1257
+ params.set("skip", String(query.skip));
1258
+ }
1259
+ if (query?.sort) {
1260
+ params.set("sort", query.sort);
1261
+ }
1262
+ return this.client.request(
1263
+ "GET",
1264
+ `/task/${encodeURIComponent(taskId)}/activity`,
1265
+ void 0,
1266
+ params.toString() ? { ...options, query: params } : options
1267
+ );
1268
+ }
1269
+ /**
1270
+ * Create a comment activity on a task.
1271
+ *
1272
+ * @example
1273
+ * const activity = await workast.tasks.activities.create('task-id', { type: 'comment', value: 'Looks good' });
1274
+ */
1275
+ create(taskId, body, options) {
1276
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/activity`, body, options);
1277
+ }
1278
+ /**
1279
+ * Update a task activity.
1280
+ *
1281
+ * @example
1282
+ * await workast.tasks.activities.update('task-id', 'activity-id', { value: 'Updated comment' });
1283
+ */
1284
+ update(taskId, activityId, body, options) {
1285
+ return this.client.request(
1286
+ "PATCH",
1287
+ `/task/${encodeURIComponent(taskId)}/activity/${encodeURIComponent(activityId)}`,
1288
+ body,
1289
+ options
1290
+ );
1291
+ }
1292
+ /**
1293
+ * Delete a task activity.
1294
+ *
1295
+ * @example
1296
+ * await workast.tasks.activities.del('task-id', 'activity-id');
1297
+ */
1298
+ del(taskId, activityId, options) {
1299
+ return this.client.request(
1300
+ "DELETE",
1301
+ `/task/${encodeURIComponent(taskId)}/activity/${encodeURIComponent(activityId)}`,
1302
+ void 0,
1303
+ options
1304
+ );
1305
+ }
1306
+ };
1307
+ var Tasks = class {
1308
+ constructor(client) {
1309
+ this.client = client;
1310
+ this.subtasks = new TaskSubtasks(client);
1311
+ this.dependencies = new TaskDependencies(client);
1312
+ this.attachments = new TaskAttachments(client);
1313
+ this.activities = new TaskActivitiesResource(client);
1314
+ }
1315
+ client;
1316
+ subtasks;
1317
+ dependencies;
1318
+ attachments;
1319
+ activities;
1320
+ /**
1321
+ * Create a task in a list.
1322
+ *
1323
+ * @example
1324
+ * const task = await workast.tasks.create('list-id', { text: 'Ship v3' });
1325
+ */
1326
+ create(listId, body, options) {
1327
+ return this.client.request("POST", `/list/${encodeURIComponent(listId)}/task`, body, options);
1328
+ }
1329
+ /**
1330
+ * Get a task by ID.
1331
+ *
1332
+ * @example
1333
+ * const task = await workast.tasks.retrieve('task-id');
1334
+ */
1335
+ retrieve(taskId, options) {
1336
+ return this.client.request("GET", `/task/${encodeURIComponent(taskId)}`, void 0, options);
1337
+ }
1338
+ /**
1339
+ * Get a task by short ID.
1340
+ *
1341
+ * @example
1342
+ * const task = await workast.tasks.retrieveByShortId('t4k1');
1343
+ */
1344
+ retrieveByShortId(shortId, options) {
1345
+ return this.client.request("GET", `/task/shortid/${encodeURIComponent(shortId)}`, void 0, options);
1346
+ }
1347
+ /**
1348
+ * Update a task.
1349
+ *
1350
+ * @example
1351
+ * await workast.tasks.update('task-id', { text: 'Ship v3' });
1352
+ */
1353
+ update(taskId, body, options) {
1354
+ return this.client.request("PATCH", `/task/${encodeURIComponent(taskId)}`, body, options);
1355
+ }
1356
+ /**
1357
+ * Delete a task.
1358
+ *
1359
+ * @example
1360
+ * await workast.tasks.del('task-id');
1361
+ */
1362
+ del(taskId, options) {
1363
+ return this.client.request("DELETE", `/task/${encodeURIComponent(taskId)}`, void 0, options);
1364
+ }
1365
+ /**
1366
+ * Search tasks.
1367
+ *
1368
+ * @example
1369
+ * const results = await workast.tasks.list({
1370
+ * predicates: [{ type: 'status', attribute: 'status', comparison: 'eq', value: 'pending' }],
1371
+ * });
1372
+ */
1373
+ list(body, options) {
1374
+ return this.client.request("POST", "/task/search", body, options);
1375
+ }
1376
+ /**
1377
+ * Complete a task.
1378
+ *
1379
+ * @example
1380
+ * await workast.tasks.complete('task-id');
1381
+ */
1382
+ complete(taskId, options) {
1383
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/done`, void 0, options);
1384
+ }
1385
+ /**
1386
+ * Uncomplete a task.
1387
+ *
1388
+ * @example
1389
+ * await workast.tasks.uncomplete('task-id');
1390
+ */
1391
+ uncomplete(taskId, options) {
1392
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/undone`, void 0, options);
1393
+ }
1394
+ /**
1395
+ * Assign users to a task.
1396
+ *
1397
+ * @example
1398
+ * await workast.tasks.assign('task-id', { users: ['user-id'] });
1399
+ */
1400
+ assign(taskId, body, options) {
1401
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/assigned`, body, options);
1402
+ }
1403
+ /**
1404
+ * Unassign users from a task.
1405
+ *
1406
+ * @example
1407
+ * await workast.tasks.unassign('task-id', { users: ['user-id'] });
1408
+ */
1409
+ unassign(taskId, body, options) {
1410
+ return this.client.request("DELETE", `/task/${encodeURIComponent(taskId)}/assigned`, body, options);
1411
+ }
1412
+ /**
1413
+ * Add followers to a task.
1414
+ *
1415
+ * @example
1416
+ * await workast.tasks.follow('task-id', { users: ['user-id'] });
1417
+ */
1418
+ follow(taskId, body, options) {
1419
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/follow`, body, options);
1420
+ }
1421
+ /**
1422
+ * Remove followers from a task.
1423
+ *
1424
+ * @example
1425
+ * await workast.tasks.unfollow('task-id', { users: ['user-id'] });
1426
+ */
1427
+ unfollow(taskId, body, options) {
1428
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/unfollow`, body, options);
1429
+ }
1430
+ /**
1431
+ * Move tasks to another list.
1432
+ *
1433
+ * @example
1434
+ * await workast.tasks.move('list-id', { tasks: ['task-id'], target: 'other-list-id' });
1435
+ */
1436
+ move(listId, body, options) {
1437
+ return this.client.request("POST", `/list/${encodeURIComponent(listId)}/move`, body, options);
1438
+ }
1439
+ /**
1440
+ * Create many tasks in a list.
1441
+ *
1442
+ * @example
1443
+ * await workast.tasks.createMany('list-id', [{ text: 'One' }, { text: 'Two' }]);
1444
+ */
1445
+ createMany(listId, body, options) {
1446
+ return this.client.request("POST", `/list/${encodeURIComponent(listId)}/task/bulk`, body, options);
1447
+ }
1448
+ /**
1449
+ * Update many tasks.
1450
+ *
1451
+ * @example
1452
+ * const result = await workast.tasks.updateMany({ tasks: ['task-id'], status: 'done' });
1453
+ */
1454
+ updateMany(body, options) {
1455
+ return this.client.request("PUT", "/task", body, options);
1456
+ }
1457
+ /**
1458
+ * List home (favourite) tasks.
1459
+ *
1460
+ * @example
1461
+ * const home = await workast.tasks.listHome();
1462
+ */
1463
+ listHome(options) {
1464
+ return this.client.request("GET", "/task/home", void 0, options);
1465
+ }
1466
+ /**
1467
+ * Add a task to the home screen.
1468
+ *
1469
+ * @example
1470
+ * await workast.tasks.addHome('task-id');
1471
+ */
1472
+ addHome(taskId, options) {
1473
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/home`, void 0, options);
1474
+ }
1475
+ /**
1476
+ * Remove a task from the home screen.
1477
+ *
1478
+ * @example
1479
+ * await workast.tasks.removeHome('task-id');
1480
+ */
1481
+ removeHome(taskId, options) {
1482
+ return this.client.request("DELETE", `/task/${encodeURIComponent(taskId)}/home`, void 0, options);
1483
+ }
1484
+ /**
1485
+ * Add tags to a task.
1486
+ *
1487
+ * @example
1488
+ * await workast.tasks.addTag('task-id', { tags: ['tag-id'] });
1489
+ */
1490
+ addTag(taskId, body, options) {
1491
+ return this.client.request("POST", `/task/${encodeURIComponent(taskId)}/tag`, body, options);
1492
+ }
1493
+ /**
1494
+ * Remove tags from a task.
1495
+ *
1496
+ * @example
1497
+ * await workast.tasks.removeTag('task-id', { tags: ['tag-id'] });
1498
+ */
1499
+ removeTag(taskId, body, options) {
1500
+ return this.client.request("DELETE", `/task/${encodeURIComponent(taskId)}/tag`, body, options);
1501
+ }
1502
+ /**
1503
+ * Convert a task into a subtask of another task.
1504
+ *
1505
+ * @example
1506
+ * await workast.tasks.convertToSubtask('task-id', { parentTaskId: 'parent-id' });
1507
+ */
1508
+ convertToSubtask(taskId, body, options) {
1509
+ return this.client.request(
1510
+ "POST",
1511
+ `/task/${encodeURIComponent(taskId)}/convert-to-subtask`,
1512
+ body,
1513
+ options
1514
+ );
1515
+ }
1516
+ /**
1517
+ * Convert a subtask into a standalone task.
1518
+ *
1519
+ * @example
1520
+ * const task = await workast.tasks.convertToTask('task-id');
1521
+ */
1522
+ convertToTask(taskId, options) {
1523
+ return this.client.request(
1524
+ "POST",
1525
+ `/task/${encodeURIComponent(taskId)}/convert-to-task`,
1526
+ void 0,
1527
+ options
1528
+ );
1529
+ }
1530
+ };
1531
+
1532
+ // src/resources/tokens.ts
1533
+ var Tokens = class {
1534
+ constructor(client) {
1535
+ this.client = client;
1536
+ }
1537
+ client;
1538
+ /**
1539
+ * Get the token details.
1540
+ *
1541
+ * @example
1542
+ * const token = await workast.tokens.retrieve();
1543
+ */
1544
+ retrieve(options) {
1545
+ return this.client.request("GET", "/me", void 0, options);
1546
+ }
1547
+ };
1548
+
1549
+ // src/resources/users.ts
1550
+ function appendValues(params, key, value) {
1551
+ if (value == null) {
1552
+ return;
1553
+ }
1554
+ if (Array.isArray(value)) {
1555
+ for (const item of value) {
1556
+ params.append(key, item);
1557
+ }
1558
+ return;
1559
+ }
1560
+ params.set(key, value);
1561
+ }
1562
+ var Users = class {
1563
+ constructor(client) {
1564
+ this.client = client;
1565
+ }
1566
+ client;
1567
+ /**
1568
+ * Get the logged-in user.
1569
+ *
1570
+ * @example
1571
+ * const me = await workast.users.me();
1572
+ */
1573
+ me(options) {
1574
+ return this.client.request("GET", "/user/me", void 0, options);
1575
+ }
1576
+ /**
1577
+ * List users in the team.
1578
+ *
1579
+ * @example
1580
+ * const users = await workast.users.list({ name: 'Ada', limit: 10 });
1581
+ */
1582
+ list(query, options) {
1583
+ const params = new URLSearchParams(options?.query);
1584
+ if (query?.name) {
1585
+ params.set("name", query.name);
1586
+ }
1587
+ if (query?.email) {
1588
+ params.set("email", query.email);
1589
+ }
1590
+ appendValues(params, "slackUserId", query?.slackUserId);
1591
+ appendValues(params, "webexUserId", query?.webexUserId);
1592
+ if (query?.random != null) {
1593
+ params.set("random", String(query.random));
1594
+ }
1595
+ appendValues(params, "status", query?.status);
1596
+ appendValues(params, "role", query?.role);
1597
+ if (query?.sort) {
1598
+ params.set("sort", query.sort);
1599
+ }
1600
+ if (query?.limit != null) {
1601
+ params.set("limit", String(query.limit));
1602
+ }
1603
+ if (query?.offset != null) {
1604
+ params.set("offset", String(query.offset));
1605
+ }
1606
+ return this.client.request(
1607
+ "GET",
1608
+ "/user",
1609
+ void 0,
1610
+ params.toString() ? { ...options, query: params } : options
1611
+ );
1612
+ }
1613
+ /**
1614
+ * Get a user by ID.
1615
+ *
1616
+ * @example
1617
+ * const user = await workast.users.retrieve('user-id');
1618
+ */
1619
+ retrieve(userId, options) {
1620
+ return this.client.request("GET", `/user/${encodeURIComponent(userId)}`, void 0, options);
1621
+ }
1622
+ /**
1623
+ * Get a user by email.
1624
+ *
1625
+ * @example
1626
+ * const user = await workast.users.retrieveByEmail('ada@example.com');
1627
+ */
1628
+ retrieveByEmail(email, query, options) {
1629
+ const params = new URLSearchParams(options?.query);
1630
+ if (query?.platform) {
1631
+ params.set("platform", query.platform);
1632
+ }
1633
+ return this.client.request(
1634
+ "GET",
1635
+ `/user/email/${encodeURIComponent(email)}`,
1636
+ void 0,
1637
+ params.toString() ? { ...options, query: params } : options
1638
+ );
1639
+ }
1640
+ /**
1641
+ * Invite a user to the team.
1642
+ *
1643
+ * @example
1644
+ * const user = await workast.users.invite({ name: 'Ada', email: 'ada@example.com', role: 'member' });
1645
+ */
1646
+ invite(body, options) {
1647
+ return this.client.request("POST", "/user/invite", body, options);
1648
+ }
1649
+ };
1650
+
1651
+ // src/resources/workflows.ts
1652
+ function pagingOptions(query, options) {
1653
+ const params = new URLSearchParams(options?.query);
1654
+ if (query?.limit != null) {
1655
+ params.set("limit", String(query.limit));
1656
+ }
1657
+ if (query?.skip != null) {
1658
+ params.set("skip", String(query.skip));
1659
+ }
1660
+ return params.toString() ? { ...options, query: params } : options;
1661
+ }
1662
+ var WorkflowsResource = class {
1663
+ constructor(client) {
1664
+ this.client = client;
1665
+ }
1666
+ client;
1667
+ /**
1668
+ * List workflows created by the logged-in user.
1669
+ *
1670
+ * @example
1671
+ * const results = await workast.workflows.list({ limit: 10, skip: 0 });
1672
+ */
1673
+ list(query, options) {
1674
+ return this.client.request("GET", "/workflow", void 0, pagingOptions(query, options));
1675
+ }
1676
+ /**
1677
+ * Create a workflow.
1678
+ *
1679
+ * @example
1680
+ * const workflow = await workast.workflows.create({
1681
+ * type: 'event',
1682
+ * trigger: 'task_created',
1683
+ * prompt: 'Ship v3',
1684
+ * lists: ['list-id'],
1685
+ * });
1686
+ */
1687
+ create(body, options) {
1688
+ return this.client.request("POST", "/workflow", body, options);
1689
+ }
1690
+ /**
1691
+ * Get a workflow by ID.
1692
+ *
1693
+ * @example
1694
+ * const workflow = await workast.workflows.retrieve('workflow-id');
1695
+ */
1696
+ retrieve(workflowId, options) {
1697
+ return this.client.request(
1698
+ "GET",
1699
+ `/workflow/${encodeURIComponent(workflowId)}`,
1700
+ void 0,
1701
+ options
1702
+ );
1703
+ }
1704
+ /**
1705
+ * Update a workflow.
1706
+ *
1707
+ * @example
1708
+ * await workast.workflows.update('workflow-id', { prompt: 'Ship v3' });
1709
+ */
1710
+ update(workflowId, body, options) {
1711
+ return this.client.request(
1712
+ "PATCH",
1713
+ `/workflow/${encodeURIComponent(workflowId)}`,
1714
+ body,
1715
+ options
1716
+ );
1717
+ }
1718
+ /**
1719
+ * Delete a workflow.
1720
+ *
1721
+ * @example
1722
+ * await workast.workflows.del('workflow-id');
1723
+ */
1724
+ del(workflowId, options) {
1725
+ return this.client.request(
1726
+ "DELETE",
1727
+ `/workflow/${encodeURIComponent(workflowId)}`,
1728
+ void 0,
1729
+ options
1730
+ );
1731
+ }
1732
+ /**
1733
+ * Activate a workflow.
1734
+ *
1735
+ * @example
1736
+ * await workast.workflows.activate('workflow-id');
1737
+ */
1738
+ activate(workflowId, options) {
1739
+ return this.client.request(
1740
+ "PATCH",
1741
+ `/workflow/${encodeURIComponent(workflowId)}/activate`,
1742
+ void 0,
1743
+ options
1744
+ );
1745
+ }
1746
+ /**
1747
+ * Deactivate a workflow.
1748
+ *
1749
+ * @example
1750
+ * await workast.workflows.deactivate('workflow-id');
1751
+ */
1752
+ deactivate(workflowId, options) {
1753
+ return this.client.request(
1754
+ "PATCH",
1755
+ `/workflow/${encodeURIComponent(workflowId)}/deactivate`,
1756
+ void 0,
1757
+ options
1758
+ );
1759
+ }
1760
+ };
1761
+
1762
+ // src/client.ts
1763
+ var DEFAULT_BASE_URL = "https://api.workast.com";
1764
+ var Workast = class _Workast {
1765
+ attachments;
1766
+ calendar;
1767
+ fields;
1768
+ lists;
1769
+ meetings;
1770
+ notes;
1771
+ notifications;
1772
+ reactions;
1773
+ searches;
1774
+ tags;
1775
+ tasks;
1776
+ tokens;
1777
+ users;
1778
+ workflows;
1779
+ apiKey;
1780
+ token;
1781
+ getTokenFn;
1782
+ baseUrl;
1783
+ fetchFn;
1784
+ headers;
1785
+ constructor(options) {
1786
+ const opts = typeof options === "string" ? { apiKey: options } : options;
1787
+ const passedApiKey = typeof options === "string" || "apiKey" in opts;
1788
+ if (typeof window !== "undefined" && passedApiKey) {
1789
+ throw new Error("apiKey cannot be used in a browser. Use token or getToken instead.");
1790
+ }
1791
+ if ("getToken" in opts) {
1792
+ this.getTokenFn = opts.getToken;
1793
+ } else if ("token" in opts) {
1794
+ this.token = opts.token;
1795
+ } else if ("apiKey" in opts) {
1796
+ this.apiKey = opts.apiKey;
1797
+ } else {
1798
+ throw new Error("Missing authentication. Provide apiKey, token, or getToken.");
1799
+ }
1800
+ this.baseUrl = opts.baseUrl ?? DEFAULT_BASE_URL;
1801
+ this.fetchFn = opts.fetch ?? globalThis.fetch.bind(globalThis);
1802
+ this.headers = withoutAuthorization(opts.headers);
1803
+ this.attachments = new Attachments(this);
1804
+ this.calendar = new CalendarResource(this);
1805
+ this.fields = new Fields(this);
1806
+ this.lists = new Lists(this);
1807
+ this.meetings = new MeetingsResource(this);
1808
+ this.notes = new NotesResource(this);
1809
+ this.notifications = new NotificationsResource(this);
1810
+ this.reactions = new Reactions(this);
1811
+ this.searches = new SearchesResource(this);
1812
+ this.tags = new Tags(this);
1813
+ this.tasks = new Tasks(this);
1814
+ this.tokens = new Tokens(this);
1815
+ this.users = new Users(this);
1816
+ this.workflows = new WorkflowsResource(this);
1817
+ }
1818
+ withHeaders(headers) {
1819
+ return new _Workast({
1820
+ ...this.authOptions(),
1821
+ baseUrl: this.baseUrl,
1822
+ fetch: this.fetchFn,
1823
+ headers: { ...this.headers, ...withoutAuthorization(headers) }
1824
+ });
1825
+ }
1826
+ setHeaders(headers) {
1827
+ this.headers = { ...this.headers, ...withoutAuthorization(headers) };
1828
+ }
1829
+ request(method, path, body, options) {
1830
+ return request(this.context(), method, path, body, options);
1831
+ }
1832
+ context() {
1833
+ return {
1834
+ baseUrl: this.baseUrl,
1835
+ headers: this.headers,
1836
+ fetch: this.fetchFn,
1837
+ resolveAuth: () => this.resolveAuth()
1838
+ };
1839
+ }
1840
+ authOptions() {
1841
+ if (this.getTokenFn) {
1842
+ return { getToken: this.getTokenFn };
1843
+ }
1844
+ if (this.token) {
1845
+ return { token: this.token };
1846
+ }
1847
+ if (this.apiKey) {
1848
+ return { apiKey: this.apiKey };
1849
+ }
1850
+ throw new Error("Missing authentication. Provide apiKey, token, or getToken.");
1851
+ }
1852
+ async resolveAuth() {
1853
+ const auth = this.authOptions();
1854
+ if ("getToken" in auth) {
1855
+ return auth.getToken();
1856
+ }
1857
+ if ("token" in auth) {
1858
+ return auth.token;
1859
+ }
1860
+ return auth.apiKey;
1861
+ }
1862
+ };
1863
+
1864
+ // src/types/examples.ts
1865
+ var examples_exports = {};
1866
+ __export(examples_exports, {
1867
+ attachment: () => attachment,
1868
+ attachmentFileUrl: () => attachmentFileUrl,
1869
+ calendarEvents: () => calendarEvents,
1870
+ commentActivity: () => commentActivity,
1871
+ customField: () => customField,
1872
+ homeTasks: () => homeTasks,
1873
+ list: () => list,
1874
+ listEnumerate: () => listEnumerate,
1875
+ meeting: () => meeting,
1876
+ meetingDetail: () => meetingDetail,
1877
+ meetingRecordingResource: () => meetingRecordingResource,
1878
+ meetings: () => meetings,
1879
+ note: () => note,
1880
+ noteDetail: () => noteDetail,
1881
+ notes: () => notes,
1882
+ notifications: () => notifications,
1883
+ reactionReadOnly: () => reactionReadOnly,
1884
+ search: () => search,
1885
+ searchDetail: () => searchDetail,
1886
+ searchResults: () => searchResults,
1887
+ searches: () => searches,
1888
+ subList: () => subList,
1889
+ tag: () => tag,
1890
+ task: () => task,
1891
+ taskActivities: () => taskActivities,
1892
+ taskBulkUpdateResult: () => taskBulkUpdateResult,
1893
+ tokenDetails: () => tokenDetails,
1894
+ user: () => user,
1895
+ userDetail: () => userDetail,
1896
+ userDetailWithTeam: () => userDetailWithTeam,
1897
+ userResource: () => userResource,
1898
+ workflow: () => workflow,
1899
+ workflowDetail: () => workflowDetail,
1900
+ workflows: () => workflows
1901
+ });
1902
+ var attachment = {
1903
+ "id": "6a844d3965f82309911408ca",
1904
+ "title": {
1905
+ "text": "Ship v3"
1906
+ },
1907
+ "createdAt": "2026-08-18T12:16:57.347Z",
1908
+ "updatedAt": "2026-08-18T12:16:57.347Z",
1909
+ "user": {
1910
+ "id": "4214932441cb21eebdb396bfe34a8340",
1911
+ "name": "Grace Hopper",
1912
+ "userName": "grace",
1913
+ "avatar": "https://cdn.workast.io/avatar.png",
1914
+ "platformDetails": {
1915
+ "name": "slack",
1916
+ "imChannel": "D3EEXS3J6",
1917
+ "selfChannel": "D1HN843U3",
1918
+ "userId": "U0HBQESA1",
1919
+ "teamId": "T0HBUA0TC"
1920
+ }
1921
+ },
1922
+ "app": {
1923
+ "id": "5d9a6b09269e415d36380d23",
1924
+ "name": "Example App",
1925
+ "description": "Ship v3",
1926
+ "icon": "https://cdn.workast.io/avatar.png",
1927
+ "createdAt": "2019-10-06T22:30:33.687Z",
1928
+ "updatedAt": "2020-03-06T21:14:00.371Z",
1929
+ "clientId": "S4GuidJp6frYrxLTuQBM5JoTug",
1930
+ "accessType": "user",
1931
+ "developedByWorkast": true
1932
+ },
1933
+ "author": {
1934
+ "id": "4214932441cb21eebdb396bfe34a8340",
1935
+ "name": "Grace Hopper",
1936
+ "userName": "grace",
1937
+ "email": "grace@example.com",
1938
+ "platformDetails": {
1939
+ "name": "slack",
1940
+ "imChannel": "D3EEXS3J6",
1941
+ "selfChannel": "D1HN843U3",
1942
+ "userId": "U0HBQESA1",
1943
+ "teamId": "T0HBUA0TC"
1944
+ },
1945
+ "confirmed": true,
1946
+ "avatar": "https://cdn.workast.io/avatar.png",
1947
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
1948
+ }
1949
+ };
1950
+ var attachmentFileUrl = {
1951
+ "id": "6a844fd765f8230991142151",
1952
+ "createdAt": "2026-08-18T12:28:07.685Z",
1953
+ "updatedAt": "2026-08-18T12:28:09.193Z",
1954
+ "user": {
1955
+ "id": "4214932441cb21eebdb396bfe34a8340",
1956
+ "virtualId": "c2xhY2svL1QwSEJVQTBUQzpVMEhCUUVTQTE=",
1957
+ "name": "Grace Hopper",
1958
+ "userName": "grace",
1959
+ "avatar": "https://cdn.workast.io/avatar.png",
1960
+ "platformDetails": {
1961
+ "name": "slack",
1962
+ "imChannel": "D3EEXS3J6",
1963
+ "selfChannel": "D1HN843U3",
1964
+ "userId": "U0HBQESA1",
1965
+ "teamId": "T0HBUA0TC"
1966
+ }
1967
+ },
1968
+ "file": {
1969
+ "name": "avatar.png",
1970
+ "type": "image/png",
1971
+ "size": 17101,
1972
+ "url": "/files/5dc40cff038a590f79c403c0/b9ca2e09-12e8-4c34-99dd-10dfaf345660",
1973
+ "thumbnails": {
1974
+ "250": "https://example.com/file",
1975
+ "500": "https://example.com/file"
1976
+ }
1977
+ },
1978
+ "link": "https://example.com/file",
1979
+ "fileUrl": "https://example.com/file"
1980
+ };
1981
+ var calendarEvents = {
1982
+ "events": [
1983
+ {
1984
+ "busy": true,
1985
+ "calendarId": "grace@example.com",
1986
+ "createdAt": 1781850701,
1987
+ "icalUid": "3b5ei15dmlrh6et2aqf7q07hbk@example.com",
1988
+ "id": "3b5ei15dmlrh6et2aqf7q07hbk",
1989
+ "organizer": {
1990
+ "email": "grace@example.com",
1991
+ "name": "Grace Hopper"
1992
+ },
1993
+ "participants": [],
1994
+ "readOnly": false,
1995
+ "status": "confirmed",
1996
+ "title": "Standup",
1997
+ "updatedAt": 1782098660,
1998
+ "visibility": "default",
1999
+ "when": {
2000
+ "endDate": "2026-07-18",
2001
+ "object": "datespan",
2002
+ "startDate": "2026-06-27"
2003
+ },
2004
+ "meeting": null
2005
+ }
2006
+ ]
2007
+ };
2008
+ var commentActivity = {
2009
+ "id": "686f7912fc2fef09733c6f58",
2010
+ "type": "comment",
2011
+ "value": "Standup",
2012
+ "status": "active",
2013
+ "createdAt": "2025-07-10T08:25:54.274Z",
2014
+ "updatedAt": "2025-07-10T08:25:54.274Z",
2015
+ "mentions": [
2016
+ {
2017
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2018
+ "name": "Ada Lovelace",
2019
+ "userName": "ada",
2020
+ "email": "ada@example.com",
2021
+ "platformDetails": {
2022
+ "name": "slack",
2023
+ "imChannel": "D3F5RQA6B",
2024
+ "selfChannel": "D1LGYBCFQ",
2025
+ "userId": "U0JU26WRG",
2026
+ "teamId": "T0HBUA0TC"
2027
+ },
2028
+ "confirmed": true,
2029
+ "avatar": "https://cdn.workast.io/avatar.png",
2030
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2031
+ }
2032
+ ],
2033
+ "reactions": [],
2034
+ "actor": {
2035
+ "type": "User",
2036
+ "data": {
2037
+ "id": "4214932441cb21eebdb396bfe34a8340",
2038
+ "name": "Grace Hopper",
2039
+ "userName": "grace",
2040
+ "email": "grace@example.com",
2041
+ "platformDetails": {
2042
+ "name": "slack",
2043
+ "imChannel": "D3EEXS3J6",
2044
+ "selfChannel": "D1HN843U3",
2045
+ "userId": "U0HBQESA1",
2046
+ "teamId": "T0HBUA0TC"
2047
+ },
2048
+ "confirmed": true,
2049
+ "avatar": "https://cdn.workast.io/avatar.png",
2050
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2051
+ }
2052
+ }
2053
+ };
2054
+ var customField = {
2055
+ "id": "61a50f7ed892d94d8c9d285e",
2056
+ "name": "Priority",
2057
+ "description": "Ship v3",
2058
+ "type": "options",
2059
+ "useAsTaskColor": false,
2060
+ "options": [
2061
+ {
2062
+ "id": "61a50f7ed892d94d8c9d285f",
2063
+ "name": "Low",
2064
+ "color": "#F2994A"
2065
+ },
2066
+ {
2067
+ "id": "63ec2019d467b10e1de14f02",
2068
+ "name": "Medium",
2069
+ "color": "#20e48b"
2070
+ },
2071
+ {
2072
+ "id": "63ec2019d467b10e1de14f03",
2073
+ "name": "Normal",
2074
+ "color": "#1156ff"
2075
+ },
2076
+ {
2077
+ "id": "63ec2019d467b10e1de14f04",
2078
+ "name": "High",
2079
+ "color": "#f50c0c"
2080
+ }
2081
+ ]
2082
+ };
2083
+ var homeTasks = {
2084
+ "tasks": [
2085
+ {
2086
+ "status": "pending",
2087
+ "text": "Ship v3",
2088
+ "shortId": "T4GNY",
2089
+ "createdAt": "2022-01-10T12:12:46.308Z",
2090
+ "updatedAt": "2025-07-10T08:25:54.460Z",
2091
+ "listPosition": 99999,
2092
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/3634dc043f0d415ec2d307284a3cfe69",
2093
+ "calendars": [
2094
+ "b2956627fe26a2c1e4b6d5202413f779"
2095
+ ],
2096
+ "id": "3634dc043f0d415ec2d307284a3cfe69",
2097
+ "list": {
2098
+ "id": "603449f6f107b67c63e8cee9",
2099
+ "name": "Product",
2100
+ "type": "group",
2101
+ "privacy": "private",
2102
+ "subLists": [
2103
+ {
2104
+ "id": "603449f6f107b67c63e8cee8",
2105
+ "name": "To-do",
2106
+ "listPosition": 1e5,
2107
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
2108
+ },
2109
+ {
2110
+ "id": "610ffd8c7374d6331a4178d8",
2111
+ "name": "In Progress",
2112
+ "listPosition": 7e5,
2113
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
2114
+ }
2115
+ ],
2116
+ "link": "https://app.workast.com/list/603449f6f107b67c63e8cee9"
2117
+ },
2118
+ "listId": "603449f6f107b67c63e8cee9",
2119
+ "subListId": "610ffd8c7374d6331a4178d8",
2120
+ "subList": {
2121
+ "id": "610ffd8c7374d6331a4178d8",
2122
+ "name": "To-do"
2123
+ },
2124
+ "assignedTo": [
2125
+ {
2126
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2127
+ "name": "Ada Lovelace",
2128
+ "userName": "ada",
2129
+ "email": "ada@example.com",
2130
+ "platformDetails": {
2131
+ "name": "slack",
2132
+ "imChannel": "D3F5RQA6B",
2133
+ "selfChannel": "D1LGYBCFQ",
2134
+ "userId": "U0JU26WRG",
2135
+ "teamId": "T0HBUA0TC"
2136
+ },
2137
+ "confirmed": true,
2138
+ "avatar": "https://cdn.workast.io/avatar.png",
2139
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2140
+ }
2141
+ ],
2142
+ "subscribers": [
2143
+ {
2144
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2145
+ "name": "Ada Lovelace",
2146
+ "userName": "ada",
2147
+ "email": "ada@example.com",
2148
+ "platformDetails": {
2149
+ "name": "slack",
2150
+ "imChannel": "D3F5RQA6B",
2151
+ "selfChannel": "D1LGYBCFQ",
2152
+ "userId": "U0JU26WRG",
2153
+ "teamId": "T0HBUA0TC"
2154
+ },
2155
+ "confirmed": true,
2156
+ "avatar": "https://cdn.workast.io/avatar.png",
2157
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2158
+ },
2159
+ {
2160
+ "id": "4214932441cb21eebdb396bfe34a8340",
2161
+ "name": "Grace Hopper",
2162
+ "userName": "grace",
2163
+ "email": "grace@example.com",
2164
+ "platformDetails": {
2165
+ "name": "slack",
2166
+ "imChannel": "D3EEXS3J6",
2167
+ "selfChannel": "D1HN843U3",
2168
+ "userId": "U0HBQESA1",
2169
+ "teamId": "T0HBUA0TC"
2170
+ },
2171
+ "confirmed": true,
2172
+ "avatar": "https://cdn.workast.io/avatar.png",
2173
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2174
+ }
2175
+ ],
2176
+ "allDay": false,
2177
+ "createdBy": {
2178
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2179
+ "name": "Ada Lovelace",
2180
+ "userName": "ada",
2181
+ "email": "ada@example.com",
2182
+ "platformDetails": {
2183
+ "name": "slack",
2184
+ "imChannel": "D3F5RQA6B",
2185
+ "selfChannel": "D1LGYBCFQ",
2186
+ "userId": "U0JU26WRG",
2187
+ "teamId": "T0HBUA0TC"
2188
+ },
2189
+ "confirmed": true,
2190
+ "avatar": "https://cdn.workast.io/avatar.png",
2191
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2192
+ },
2193
+ "hasDescription": true,
2194
+ "numberOfComments": 1,
2195
+ "numberOfAttachments": 0,
2196
+ "totalSubTasks": 1,
2197
+ "completedSubTasks": 0,
2198
+ "isSubscribed": true,
2199
+ "lastComment": {
2200
+ "id": "686f7912fc2fef09733c6f58",
2201
+ "type": "comment",
2202
+ "value": "Standup",
2203
+ "status": "active",
2204
+ "createdAt": "2025-07-10T08:25:54.274Z",
2205
+ "updatedAt": "2025-07-10T08:25:54.274Z",
2206
+ "mentions": [
2207
+ {
2208
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2209
+ "name": "Ada Lovelace",
2210
+ "userName": "ada",
2211
+ "email": "ada@example.com",
2212
+ "platformDetails": {
2213
+ "name": "slack",
2214
+ "imChannel": "D3F5RQA6B",
2215
+ "selfChannel": "D1LGYBCFQ",
2216
+ "userId": "U0JU26WRG",
2217
+ "teamId": "T0HBUA0TC"
2218
+ },
2219
+ "confirmed": true,
2220
+ "avatar": "https://cdn.workast.io/avatar.png",
2221
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2222
+ }
2223
+ ],
2224
+ "reactions": [],
2225
+ "actor": {
2226
+ "type": "User",
2227
+ "data": {
2228
+ "id": "4214932441cb21eebdb396bfe34a8340",
2229
+ "name": "Grace Hopper",
2230
+ "userName": "grace",
2231
+ "email": "grace@example.com",
2232
+ "platformDetails": {
2233
+ "name": "slack",
2234
+ "imChannel": "D3EEXS3J6",
2235
+ "selfChannel": "D1HN843U3",
2236
+ "userId": "U0HBQESA1",
2237
+ "teamId": "T0HBUA0TC"
2238
+ },
2239
+ "confirmed": true,
2240
+ "avatar": "https://cdn.workast.io/avatar.png",
2241
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2242
+ }
2243
+ }
2244
+ },
2245
+ "taskStatus": {
2246
+ "id": "5c7184fa40721e2ed4175a6e",
2247
+ "label": "Open",
2248
+ "color": "#808080",
2249
+ "createdAt": "2019-02-23T17:38:02.928Z",
2250
+ "updatedAt": "2019-02-23T17:38:02.928Z"
2251
+ },
2252
+ "milestones": [],
2253
+ "inHome": true,
2254
+ "fields": []
2255
+ }
2256
+ ],
2257
+ "total": 1
2258
+ };
2259
+ var list = {
2260
+ "id": "5a6ebde81519395731f90e2f",
2261
+ "hash": "26873fa18b3a3c5bfd82f9d8e2dafa05",
2262
+ "avatar": "https://cdn.workast.io/list-avatar.png",
2263
+ "name": "Engineering",
2264
+ "numberOfParticipants": 2,
2265
+ "type": "group",
2266
+ "privacy": "private",
2267
+ "platformDetails": {
2268
+ "name": "slack",
2269
+ "channelId": "G8TRB56E8",
2270
+ "channelName": "engineering",
2271
+ "type": "group",
2272
+ "teamId": "T0HBUA0TC"
2273
+ },
2274
+ "isArchived": false,
2275
+ "createdBy": "b2956627fe26a2c1e4b6d5202413f779",
2276
+ "participants": [
2277
+ "4214932441cb21eebdb396bfe34a8340",
2278
+ "c51a9c1a2ddfbcefa7abf74036e0c616",
2279
+ "b2956627fe26a2c1e4b6d5202413f779"
2280
+ ],
2281
+ "platformNotifications": {
2282
+ "taskCreated": true,
2283
+ "taskCompleted": true
2284
+ },
2285
+ "apps": [
2286
+ {
2287
+ "id": "5af007dff36d2837eae6e56c",
2288
+ "name": "Slack",
2289
+ "description": "Ship v3",
2290
+ "icon": "https://cdn.workast.io/integrations/Slack/icon.png",
2291
+ "updatedAt": "2023-11-15T03:23:37.468Z",
2292
+ "clientId": "nUsktT5eDzpbJE15WLfMejf9oJ",
2293
+ "accessType": "user",
2294
+ "developedByWorkast": true,
2295
+ "integration": {
2296
+ "spaceActions": [
2297
+ {
2298
+ "actionId": "SHOW_SETTINGS",
2299
+ "label": "Slack"
2300
+ }
2301
+ ],
2302
+ "taskActions": []
2303
+ }
2304
+ },
2305
+ {
2306
+ "id": "5b23da45e7179a589282a60c",
2307
+ "name": "Email",
2308
+ "description": "Ship v3",
2309
+ "icon": "https://cdn.workast.io/integrations/Email/icon.png",
2310
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2311
+ "clientId": "Jr5LKksQ9PZhr89R3l93aaaaab",
2312
+ "accessType": "user",
2313
+ "developedByWorkast": true,
2314
+ "integration": {
2315
+ "spaceActions": [
2316
+ {
2317
+ "actionId": "SHOW_SETTINGS",
2318
+ "label": "Email"
2319
+ }
2320
+ ],
2321
+ "taskActions": []
2322
+ }
2323
+ }
2324
+ ],
2325
+ "defaultSubList": "5a6ebde81519395731f90e30",
2326
+ "subLists": [
2327
+ {
2328
+ "id": "5a6ebde81519395731f90e30",
2329
+ "name": "To-do",
2330
+ "listPosition": 1e5,
2331
+ "createdBy": "b2956627fe26a2c1e4b6d5202413f779"
2332
+ }
2333
+ ],
2334
+ "link": "https://app.workast.com/list/5a6ebde81519395731f90e2f",
2335
+ "isParticipant": true,
2336
+ "someParticipants": [
2337
+ {
2338
+ "id": "4214932441cb21eebdb396bfe34a8340",
2339
+ "name": "Grace Hopper",
2340
+ "userName": "grace",
2341
+ "email": "grace@example.com",
2342
+ "platformDetails": {
2343
+ "name": "slack",
2344
+ "imChannel": "D3EEXS3J6",
2345
+ "selfChannel": "D1HN843U3",
2346
+ "userId": "U0HBQESA1",
2347
+ "teamId": "T0HBUA0TC"
2348
+ },
2349
+ "confirmed": true,
2350
+ "avatar": "https://cdn.workast.io/avatar.png",
2351
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2352
+ },
2353
+ {
2354
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2355
+ "name": "Ada Lovelace",
2356
+ "userName": "ada",
2357
+ "email": "ada@example.com",
2358
+ "platformDetails": {
2359
+ "name": "slack",
2360
+ "imChannel": "D3F5RQA6B",
2361
+ "selfChannel": "D1LGYBCFQ",
2362
+ "userId": "U0JU26WRG",
2363
+ "teamId": "T0HBUA0TC"
2364
+ },
2365
+ "confirmed": true,
2366
+ "avatar": "https://cdn.workast.io/avatar.png",
2367
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2368
+ }
2369
+ ],
2370
+ "columns": [
2371
+ "assignedTo",
2372
+ "dueDate",
2373
+ "doneBy",
2374
+ "doneAt"
2375
+ ],
2376
+ "groupBy": "subList",
2377
+ "isBookmarked": false
2378
+ };
2379
+ var listEnumerate = {
2380
+ "id": "5a6ebde81519395731f90e2f",
2381
+ "hash": "26873fa18b3a3c5bfd82f9d8e2dafa05",
2382
+ "name": "Engineering",
2383
+ "createdAt": "2018-01-29T06:23:36.194Z",
2384
+ "createdBy": {
2385
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
2386
+ "name": "Ada Lovelace",
2387
+ "userName": "ada",
2388
+ "email": "ada@example.com",
2389
+ "platformDetails": {
2390
+ "name": "slack",
2391
+ "imChannel": "D3F5RQA6B",
2392
+ "selfChannel": "D1LGYBCFQ",
2393
+ "userId": "U0JU26WRG",
2394
+ "teamId": "T0HBUA0TC"
2395
+ },
2396
+ "confirmed": true,
2397
+ "avatar": "https://cdn.workast.io/avatar.png",
2398
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2399
+ },
2400
+ "avatar": "https://cdn.workast.io/list-avatar.png",
2401
+ "numberOfParticipants": 3,
2402
+ "type": "group",
2403
+ "privacy": "private",
2404
+ "isArchived": false,
2405
+ "platformDetails": {
2406
+ "name": "slack",
2407
+ "channelId": "G8TRB56E8",
2408
+ "channelName": "engineering",
2409
+ "type": "group",
2410
+ "teamId": "T0HBUA0TC"
2411
+ },
2412
+ "platformNotifications": {
2413
+ "taskCreated": true,
2414
+ "taskCompleted": true
2415
+ },
2416
+ "subLists": [
2417
+ {
2418
+ "id": "5a6ebde81519395731f90e30",
2419
+ "name": "To-do",
2420
+ "listPosition": 1e5,
2421
+ "createdBy": "b2956627fe26a2c1e4b6d5202413f779"
2422
+ }
2423
+ ],
2424
+ "defaultSubList": "5a6ebde81519395731f90e30",
2425
+ "isParticipant": true,
2426
+ "link": "https://app.workast.com/list/5a6ebde81519395731f90e2f"
2427
+ };
2428
+ var meeting = {
2429
+ "id": "6a844c4c6bc4270979c79d34",
2430
+ "createdAt": "2026-08-18T12:13:00.327Z",
2431
+ "updatedAt": "2026-08-18T12:13:00.327Z",
2432
+ "summary": "Standup",
2433
+ "status": "active",
2434
+ "eventId": "2bi7qgtg2k615gsm4fom4oa2l8",
2435
+ "isRecurrent": false,
2436
+ "organizer": {
2437
+ "id": "4214932441cb21eebdb396bfe34a8340",
2438
+ "name": "Grace Hopper",
2439
+ "userName": "grace",
2440
+ "email": "grace@example.com",
2441
+ "platformDetails": {
2442
+ "name": "slack",
2443
+ "imChannel": "D3EEXS3J6",
2444
+ "selfChannel": "D1HN843U3",
2445
+ "userId": "U0HBQESA1",
2446
+ "teamId": "T0HBUA0TC"
2447
+ },
2448
+ "confirmed": true,
2449
+ "avatar": "https://cdn.workast.io/avatar.png",
2450
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2451
+ },
2452
+ "totalAttendees": 1,
2453
+ "someAttendees": [],
2454
+ "list": {
2455
+ "id": "5a6ebde81519395731f90e2f",
2456
+ "name": "Engineering",
2457
+ "type": "group",
2458
+ "status": "active",
2459
+ "privacy": "private",
2460
+ "link": "https://app.workast.com/list/5a6ebde81519395731f90e2f"
2461
+ },
2462
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/meeting/6a844c4c6bc4270979c79d34",
2463
+ "notetaker": {
2464
+ "enabled": false
2465
+ },
2466
+ "start": "2026-09-01T15:00:00.000Z",
2467
+ "end": "2026-09-01T15:30:00.000Z",
2468
+ "allDay": false
2469
+ };
2470
+ var meetingDetail = {
2471
+ "id": "6a6840c6cc9ea3097a801627",
2472
+ "createdAt": "2026-07-28T05:40:22.966Z",
2473
+ "updatedAt": "2026-08-11T01:56:10.130Z",
2474
+ "summary": "Standup",
2475
+ "status": "active",
2476
+ "eventId": "gobiji6ddnsgaausdrhftf2cb2_20260728T223000Z",
2477
+ "isRecurrent": true,
2478
+ "organizer": {
2479
+ "id": "4214932441cb21eebdb396bfe34a8340",
2480
+ "name": "Grace Hopper",
2481
+ "userName": "grace",
2482
+ "email": "grace@example.com",
2483
+ "platformDetails": {
2484
+ "name": "slack",
2485
+ "imChannel": "D3EEXS3J6",
2486
+ "selfChannel": "D1HN843U3",
2487
+ "userId": "U0HBQESA1",
2488
+ "teamId": "T0HBUA0TC"
2489
+ },
2490
+ "confirmed": true,
2491
+ "avatar": "https://cdn.workast.io/avatar.png",
2492
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2493
+ },
2494
+ "totalAttendees": 2,
2495
+ "someAttendees": [
2496
+ {
2497
+ "id": "4214932441cb21eebdb396bfe34a8340",
2498
+ "name": "Grace Hopper",
2499
+ "userName": "grace",
2500
+ "email": "grace@example.com",
2501
+ "platformDetails": {
2502
+ "name": "slack",
2503
+ "imChannel": "D3EEXS3J6",
2504
+ "selfChannel": "D1HN843U3",
2505
+ "userId": "U0HBQESA1",
2506
+ "teamId": "T0HBUA0TC"
2507
+ },
2508
+ "confirmed": true,
2509
+ "avatar": "https://cdn.workast.io/avatar.png",
2510
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2511
+ }
2512
+ ],
2513
+ "list": {
2514
+ "id": "5fc58f3d15ff9110b64ca426",
2515
+ "type": "group",
2516
+ "status": "active",
2517
+ "privacy": "team",
2518
+ "link": "https://app.workast.com/list/5fc58f3d15ff9110b64ca426",
2519
+ "name": "Product"
2520
+ },
2521
+ "link": "https://app.workast.com/meeting/6a6840c6cc9ea3097a801627",
2522
+ "conferenceData": {
2523
+ "joinUrl": "https://example.com/file",
2524
+ "provider": "Google Meet"
2525
+ },
2526
+ "notetaker": {
2527
+ "enabled": false
2528
+ },
2529
+ "start": "2026-07-31T00:30:00.000Z",
2530
+ "end": "2026-07-31T02:00:00.000Z",
2531
+ "allDay": false,
2532
+ "totalTasks": 0,
2533
+ "completedTasks": 0
2534
+ };
2535
+ var meetingRecordingResource = {
2536
+ "transcript": {
2537
+ "object": "transcript",
2538
+ "type": "speaker_labelled",
2539
+ "language": "es",
2540
+ "transcript": [
2541
+ {
2542
+ "speaker": "Speaker A",
2543
+ "start": 37850,
2544
+ "end": 116040,
2545
+ "text": "Standup"
2546
+ }
2547
+ ]
2548
+ }
2549
+ };
2550
+ var meetings = {
2551
+ "meetings": [
2552
+ {
2553
+ "id": "6a6840c6cc9ea3097a801627",
2554
+ "summary": "Standup",
2555
+ "eventId": "gobiji6ddnsgaausdrhftf2cb2_20260728T223000Z",
2556
+ "isRecurrent": true,
2557
+ "organizer": {
2558
+ "id": "4214932441cb21eebdb396bfe34a8340",
2559
+ "name": "Grace Hopper",
2560
+ "userName": "grace",
2561
+ "email": "grace@example.com",
2562
+ "platformDetails": {
2563
+ "name": "slack",
2564
+ "imChannel": "D3EEXS3J6",
2565
+ "selfChannel": "D1HN843U3",
2566
+ "userId": "U0HBQESA1",
2567
+ "teamId": "T0HBUA0TC"
2568
+ },
2569
+ "confirmed": true,
2570
+ "avatar": "https://cdn.workast.io/avatar.png",
2571
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2572
+ },
2573
+ "totalAttendees": 2,
2574
+ "someAttendees": [
2575
+ {
2576
+ "id": "4214932441cb21eebdb396bfe34a8340",
2577
+ "name": "Grace Hopper",
2578
+ "userName": "grace",
2579
+ "email": "grace@example.com",
2580
+ "platformDetails": {
2581
+ "name": "slack",
2582
+ "imChannel": "D3EEXS3J6",
2583
+ "selfChannel": "D1HN843U3",
2584
+ "userId": "U0HBQESA1",
2585
+ "teamId": "T0HBUA0TC"
2586
+ },
2587
+ "confirmed": true,
2588
+ "avatar": "https://cdn.workast.io/avatar.png",
2589
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2590
+ },
2591
+ {
2592
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2593
+ "name": "Katherine Johnson",
2594
+ "userName": "katherine",
2595
+ "email": "katherine@example.com",
2596
+ "platformDetails": {
2597
+ "name": "slack",
2598
+ "imChannel": "D06JN8RT8KB",
2599
+ "selfChannel": "D06HV290V6K",
2600
+ "userId": "U06J9JSF6R0",
2601
+ "teamId": "T0HBUA0TC"
2602
+ },
2603
+ "confirmed": false,
2604
+ "avatar": "https://cdn.workast.io/avatar.png",
2605
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2606
+ }
2607
+ ],
2608
+ "link": "https://app.workast.com/meeting/6a6840c6cc9ea3097a801627",
2609
+ "start": "2026-07-31T00:30:00.000Z",
2610
+ "end": "2026-07-31T02:00:00.000Z",
2611
+ "allDay": false,
2612
+ "totalTasks": 0,
2613
+ "completedTasks": 0
2614
+ }
2615
+ ],
2616
+ "nextPageToken": "eyJzdGFydCI6IjIwMjYtMDctMzFUMDA6MzA6MDAuMDAwWiIsImlkIjoiNmE2ODQwYzZjYzllYTMwOTdhODAxNjI3In0"
2617
+ };
2618
+ var note = {
2619
+ "id": "6994a3e051b10d097caddd0f",
2620
+ "title": "Ship v3",
2621
+ "createdAt": "2026-02-17T17:22:40.359Z",
2622
+ "updatedAt": "2026-02-23T22:00:53.158Z",
2623
+ "version": 58,
2624
+ "list": {
2625
+ "id": "6938534c1679f90979e5ccf4",
2626
+ "avatar": "https://cdn.workast.io/list-avatar.png",
2627
+ "name": "Engineering",
2628
+ "numberOfParticipants": 2,
2629
+ "type": "group",
2630
+ "slug": "engineering",
2631
+ "privacy": "team",
2632
+ "platformDetails": {
2633
+ "type": "group"
2634
+ },
2635
+ "isArchived": false,
2636
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d",
2637
+ "participants": [
2638
+ "67c6206fc7cb0feb115113cdf71aa72d",
2639
+ "4214932441cb21eebdb396bfe34a8340"
2640
+ ],
2641
+ "platformNotifications": {
2642
+ "taskCreated": true,
2643
+ "taskCompleted": true
2644
+ },
2645
+ "apps": [
2646
+ {
2647
+ "id": "5b23da45e7179a589282a60c",
2648
+ "name": "Email",
2649
+ "description": "Ship v3",
2650
+ "icon": "https://cdn.workast.io/integrations/Email/icon.png",
2651
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2652
+ "clientId": "Jr5LKksQ9PZhr89R3l93aaaaab",
2653
+ "accessType": "user",
2654
+ "developedByWorkast": true,
2655
+ "integration": {
2656
+ "spaceActions": [
2657
+ {
2658
+ "actionId": "SHOW_SETTINGS",
2659
+ "label": "Email"
2660
+ }
2661
+ ],
2662
+ "taskActions": []
2663
+ }
2664
+ },
2665
+ {
2666
+ "name": "Example App",
2667
+ "description": "Ship v3",
2668
+ "icon": "https://cdn.workast.io/avatar.png",
2669
+ "createdAt": "2019-10-06T22:30:33.687Z",
2670
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2671
+ "clientId": "S4GuidJp6frYrxLTuQBM5JoTug",
2672
+ "accessType": "user",
2673
+ "developedByWorkast": true,
2674
+ "id": "5d83a3de767119000151da7a"
2675
+ }
2676
+ ],
2677
+ "defaultSubList": "6938534c1679f90979e5ccf3",
2678
+ "subLists": [
2679
+ {
2680
+ "id": "6938534c1679f90979e5ccf3",
2681
+ "name": "To-do",
2682
+ "listPosition": 1e5,
2683
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2684
+ },
2685
+ {
2686
+ "id": "693853701679f90979e5d186",
2687
+ "name": "In Progress",
2688
+ "listPosition": 2e5,
2689
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2690
+ }
2691
+ ],
2692
+ "link": "https://app.workast.com/list/6938534c1679f90979e5ccf4",
2693
+ "isParticipant": true,
2694
+ "someParticipants": [
2695
+ {
2696
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2697
+ "name": "Katherine Johnson",
2698
+ "userName": "katherine",
2699
+ "email": "katherine@example.com",
2700
+ "platformDetails": {
2701
+ "name": "slack",
2702
+ "imChannel": "D06JN8RT8KB",
2703
+ "selfChannel": "D06HV290V6K",
2704
+ "userId": "U06J9JSF6R0",
2705
+ "teamId": "T0HBUA0TC"
2706
+ },
2707
+ "confirmed": false,
2708
+ "avatar": "https://cdn.workast.io/avatar.png",
2709
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2710
+ }
2711
+ ],
2712
+ "columns": [
2713
+ "assignedTo",
2714
+ "dueDate",
2715
+ "doneBy",
2716
+ "doneAt"
2717
+ ],
2718
+ "groupBy": "subList"
2719
+ },
2720
+ "createdBy": {
2721
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2722
+ "name": "Katherine Johnson",
2723
+ "userName": "katherine",
2724
+ "email": "katherine@example.com",
2725
+ "platformDetails": {
2726
+ "name": "slack",
2727
+ "imChannel": "D06JN8RT8KB",
2728
+ "selfChannel": "D06HV290V6K",
2729
+ "userId": "U06J9JSF6R0",
2730
+ "teamId": "T0HBUA0TC"
2731
+ },
2732
+ "confirmed": false,
2733
+ "avatar": "https://cdn.workast.io/avatar.png",
2734
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2735
+ }
2736
+ };
2737
+ var noteDetail = {
2738
+ "id": "6994a3e051b10d097caddd0f",
2739
+ "title": "Ship v3",
2740
+ "createdAt": "2026-02-17T17:22:40.359Z",
2741
+ "updatedAt": "2026-02-23T22:00:53.158Z",
2742
+ "version": 58,
2743
+ "list": {
2744
+ "id": "6938534c1679f90979e5ccf4",
2745
+ "avatar": "https://cdn.workast.io/list-avatar.png",
2746
+ "name": "Engineering",
2747
+ "numberOfParticipants": 2,
2748
+ "type": "group",
2749
+ "slug": "engineering",
2750
+ "privacy": "team",
2751
+ "platformDetails": {
2752
+ "type": "group"
2753
+ },
2754
+ "isArchived": false,
2755
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d",
2756
+ "participants": [
2757
+ "67c6206fc7cb0feb115113cdf71aa72d",
2758
+ "4214932441cb21eebdb396bfe34a8340"
2759
+ ],
2760
+ "platformNotifications": {
2761
+ "taskCreated": true,
2762
+ "taskCompleted": true
2763
+ },
2764
+ "apps": [
2765
+ {
2766
+ "id": "5b23da45e7179a589282a60c",
2767
+ "name": "Email",
2768
+ "description": "Ship v3",
2769
+ "icon": "https://cdn.workast.io/integrations/Email/icon.png",
2770
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2771
+ "clientId": "Jr5LKksQ9PZhr89R3l93aaaaab",
2772
+ "accessType": "user",
2773
+ "developedByWorkast": true,
2774
+ "integration": {
2775
+ "spaceActions": [
2776
+ {
2777
+ "actionId": "SHOW_SETTINGS",
2778
+ "label": "Email"
2779
+ }
2780
+ ],
2781
+ "taskActions": []
2782
+ }
2783
+ },
2784
+ {
2785
+ "name": "Example App",
2786
+ "description": "Ship v3",
2787
+ "icon": "https://cdn.workast.io/avatar.png",
2788
+ "createdAt": "2019-10-06T22:30:33.687Z",
2789
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2790
+ "clientId": "S4GuidJp6frYrxLTuQBM5JoTug",
2791
+ "accessType": "user",
2792
+ "developedByWorkast": true,
2793
+ "id": "5d83a3de767119000151da7a"
2794
+ }
2795
+ ],
2796
+ "defaultSubList": "6938534c1679f90979e5ccf3",
2797
+ "subLists": [
2798
+ {
2799
+ "id": "6938534c1679f90979e5ccf3",
2800
+ "name": "To-do",
2801
+ "listPosition": 1e5,
2802
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2803
+ },
2804
+ {
2805
+ "id": "693853701679f90979e5d186",
2806
+ "name": "In Progress",
2807
+ "listPosition": 2e5,
2808
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2809
+ }
2810
+ ],
2811
+ "link": "https://app.workast.com/list/6938534c1679f90979e5ccf4",
2812
+ "isParticipant": true,
2813
+ "someParticipants": [
2814
+ {
2815
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2816
+ "name": "Katherine Johnson",
2817
+ "userName": "katherine",
2818
+ "email": "katherine@example.com",
2819
+ "platformDetails": {
2820
+ "name": "slack",
2821
+ "imChannel": "D06JN8RT8KB",
2822
+ "selfChannel": "D06HV290V6K",
2823
+ "userId": "U06J9JSF6R0",
2824
+ "teamId": "T0HBUA0TC"
2825
+ },
2826
+ "confirmed": false,
2827
+ "avatar": "https://cdn.workast.io/avatar.png",
2828
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2829
+ }
2830
+ ],
2831
+ "columns": [
2832
+ "assignedTo",
2833
+ "dueDate",
2834
+ "doneBy",
2835
+ "doneAt"
2836
+ ],
2837
+ "groupBy": "subList"
2838
+ },
2839
+ "createdBy": {
2840
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2841
+ "name": "Katherine Johnson",
2842
+ "userName": "katherine",
2843
+ "email": "katherine@example.com",
2844
+ "platformDetails": {
2845
+ "name": "slack",
2846
+ "imChannel": "D06JN8RT8KB",
2847
+ "selfChannel": "D06HV290V6K",
2848
+ "userId": "U06J9JSF6R0",
2849
+ "teamId": "T0HBUA0TC"
2850
+ },
2851
+ "confirmed": false,
2852
+ "avatar": "https://cdn.workast.io/avatar.png",
2853
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2854
+ },
2855
+ "body": "<p>Ship v3</p>"
2856
+ };
2857
+ var notes = {
2858
+ "notes": [
2859
+ {
2860
+ "id": "6994a3e051b10d097caddd0f",
2861
+ "title": "Ship v3",
2862
+ "createdAt": "2026-02-17T17:22:40.359Z",
2863
+ "updatedAt": "2026-02-23T22:00:53.158Z",
2864
+ "version": 58,
2865
+ "list": {
2866
+ "id": "6938534c1679f90979e5ccf4",
2867
+ "avatar": "https://cdn.workast.io/list-avatar.png",
2868
+ "name": "Engineering",
2869
+ "numberOfParticipants": 2,
2870
+ "type": "group",
2871
+ "slug": "engineering",
2872
+ "privacy": "team",
2873
+ "platformDetails": {
2874
+ "type": "group"
2875
+ },
2876
+ "isArchived": false,
2877
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d",
2878
+ "participants": [
2879
+ "67c6206fc7cb0feb115113cdf71aa72d",
2880
+ "4214932441cb21eebdb396bfe34a8340"
2881
+ ],
2882
+ "platformNotifications": {
2883
+ "taskCreated": true,
2884
+ "taskCompleted": true
2885
+ },
2886
+ "apps": [
2887
+ {
2888
+ "id": "5b23da45e7179a589282a60c",
2889
+ "name": "Email",
2890
+ "description": "Ship v3",
2891
+ "icon": "https://cdn.workast.io/integrations/Email/icon.png",
2892
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2893
+ "clientId": "Jr5LKksQ9PZhr89R3l93aaaaab",
2894
+ "accessType": "user",
2895
+ "developedByWorkast": true,
2896
+ "integration": {
2897
+ "spaceActions": [
2898
+ {
2899
+ "actionId": "SHOW_SETTINGS",
2900
+ "label": "Email"
2901
+ }
2902
+ ],
2903
+ "taskActions": []
2904
+ }
2905
+ },
2906
+ {
2907
+ "name": "Example App",
2908
+ "description": "Ship v3",
2909
+ "icon": "https://cdn.workast.io/avatar.png",
2910
+ "createdAt": "2019-10-06T22:30:33.687Z",
2911
+ "updatedAt": "2020-03-06T21:14:00.371Z",
2912
+ "clientId": "S4GuidJp6frYrxLTuQBM5JoTug",
2913
+ "accessType": "user",
2914
+ "developedByWorkast": true,
2915
+ "id": "5d83a3de767119000151da7a"
2916
+ }
2917
+ ],
2918
+ "defaultSubList": "6938534c1679f90979e5ccf3",
2919
+ "subLists": [
2920
+ {
2921
+ "id": "6938534c1679f90979e5ccf3",
2922
+ "name": "To-do",
2923
+ "listPosition": 1e5,
2924
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2925
+ },
2926
+ {
2927
+ "id": "693853701679f90979e5d186",
2928
+ "name": "In Progress",
2929
+ "listPosition": 2e5,
2930
+ "createdBy": "67c6206fc7cb0feb115113cdf71aa72d"
2931
+ }
2932
+ ],
2933
+ "link": "https://app.workast.com/list/6938534c1679f90979e5ccf4",
2934
+ "isParticipant": true,
2935
+ "someParticipants": [
2936
+ {
2937
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2938
+ "name": "Katherine Johnson",
2939
+ "userName": "katherine",
2940
+ "email": "katherine@example.com",
2941
+ "platformDetails": {
2942
+ "name": "slack",
2943
+ "imChannel": "D06JN8RT8KB",
2944
+ "selfChannel": "D06HV290V6K",
2945
+ "userId": "U06J9JSF6R0",
2946
+ "teamId": "T0HBUA0TC"
2947
+ },
2948
+ "confirmed": false,
2949
+ "avatar": "https://cdn.workast.io/avatar.png",
2950
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2951
+ }
2952
+ ],
2953
+ "columns": [
2954
+ "assignedTo",
2955
+ "dueDate",
2956
+ "doneBy",
2957
+ "doneAt"
2958
+ ],
2959
+ "groupBy": "subList"
2960
+ },
2961
+ "createdBy": {
2962
+ "id": "67c6206fc7cb0feb115113cdf71aa72d",
2963
+ "name": "Katherine Johnson",
2964
+ "userName": "katherine",
2965
+ "email": "katherine@example.com",
2966
+ "platformDetails": {
2967
+ "name": "slack",
2968
+ "imChannel": "D06JN8RT8KB",
2969
+ "selfChannel": "D06HV290V6K",
2970
+ "userId": "U06J9JSF6R0",
2971
+ "teamId": "T0HBUA0TC"
2972
+ },
2973
+ "confirmed": false,
2974
+ "avatar": "https://cdn.workast.io/avatar.png",
2975
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
2976
+ }
2977
+ }
2978
+ ],
2979
+ "total": 168
2980
+ };
2981
+ var notifications = {
2982
+ "notifications": [
2983
+ {
2984
+ "id": "6a7ea6b48e9808acbda8914f",
2985
+ "type": "meeting_media_ready",
2986
+ "read": false,
2987
+ "activityId": "6a7ea6b48e9808acbda89147",
2988
+ "sentAt": "2026-08-14T05:25:08.472Z",
2989
+ "createdAt": "2026-08-14T05:25:08.474Z",
2990
+ "content": {
2991
+ "actor": {
2992
+ "type": "App",
2993
+ "id": {
2994
+ "id": "5ed17524aa2ab23bf71d324d",
2995
+ "name": "Meetings",
2996
+ "icon": "https://cdn.workast.io/avatar.png"
2997
+ }
2998
+ },
2999
+ "message": "Standup"
3000
+ },
3001
+ "activityType": "meeting_media_ready"
3002
+ }
3003
+ ],
3004
+ "total": 2244
3005
+ };
3006
+ var reactionReadOnly = {
3007
+ "id": "6a844d5e6bc4270979c7a8ee",
3008
+ "emoji": ":+1:",
3009
+ "total": 1,
3010
+ "users": [
3011
+ {
3012
+ "name": "Grace Hopper"
3013
+ }
3014
+ ]
3015
+ };
3016
+ var search = {
3017
+ "id": "5f0e23098d49422410c20540",
3018
+ "custom": true,
3019
+ "name": "Ship v3",
3020
+ "payload": {
3021
+ "sort": [
3022
+ {
3023
+ "direction": 1,
3024
+ "field": "listName"
3025
+ }
3026
+ ],
3027
+ "includeSubTasks": true,
3028
+ "predicates": [
3029
+ {
3030
+ "value": "pending",
3031
+ "comparison": "eq",
3032
+ "attribute": "status",
3033
+ "type": "status"
3034
+ }
3035
+ ],
3036
+ "columns": [
3037
+ "list"
3038
+ ]
3039
+ },
3040
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/search/5f0e23098d49422410c20540",
3041
+ "isPrimary": false,
3042
+ "users": [],
3043
+ "createdBy": {
3044
+ "user": {
3045
+ "id": "4214932441cb21eebdb396bfe34a8340",
3046
+ "name": "Grace Hopper",
3047
+ "userName": "grace",
3048
+ "email": "grace@example.com",
3049
+ "platformDetails": {
3050
+ "name": "slack",
3051
+ "imChannel": "D3EEXS3J6",
3052
+ "selfChannel": "D1HN843U3",
3053
+ "userId": "U0HBQESA1",
3054
+ "teamId": "T0HBUA0TC"
3055
+ },
3056
+ "confirmed": true,
3057
+ "avatar": "https://cdn.workast.io/avatar.png",
3058
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3059
+ }
3060
+ },
3061
+ "createdAt": "2020-07-14T21:26:33.254Z",
3062
+ "updatedAt": "2023-05-31T23:15:19.277Z",
3063
+ "values": {
3064
+ "list": {
3065
+ "5a99a7a58373fa652992e665": {
3066
+ "id": "5a99a7a58373fa652992e665",
3067
+ "type": "group",
3068
+ "status": "active",
3069
+ "privacy": "team",
3070
+ "link": "https://app.workast.com/list/5a99a7a58373fa652992e665",
3071
+ "name": "Engineering"
3072
+ },
3073
+ "5dc40cff038a590f79c403c0": {
3074
+ "id": "5dc40cff038a590f79c403c0",
3075
+ "type": "group",
3076
+ "status": "active",
3077
+ "privacy": "team",
3078
+ "link": "https://app.workast.com/list/5dc40cff038a590f79c403c0",
3079
+ "name": "Product"
3080
+ },
3081
+ "5fc58f3d15ff9110b64ca426": {
3082
+ "id": "5fc58f3d15ff9110b64ca426",
3083
+ "type": "group",
3084
+ "status": "active",
3085
+ "privacy": "team",
3086
+ "link": "https://app.workast.com/list/5fc58f3d15ff9110b64ca426",
3087
+ "name": "Engineering"
3088
+ }
3089
+ }
3090
+ }
3091
+ };
3092
+ var searchDetail = {
3093
+ "id": "5ddfeab45ff6d925d23c929e",
3094
+ "custom": true,
3095
+ "name": "Ship v3",
3096
+ "payload": {
3097
+ "includeSubTasks": true,
3098
+ "predicates": [
3099
+ {
3100
+ "value": "pending",
3101
+ "comparison": "eq",
3102
+ "attribute": "status",
3103
+ "type": "status"
3104
+ },
3105
+ {
3106
+ "predicates": [
3107
+ {
3108
+ "value": "5a176b5aa67ba147e5057516",
3109
+ "comparison": "eq",
3110
+ "attribute": "listId",
3111
+ "type": "list"
3112
+ },
3113
+ {
3114
+ "value": "5d7be323c662860f7c97ba12",
3115
+ "comparison": "eq",
3116
+ "attribute": "listId",
3117
+ "type": "list"
3118
+ },
3119
+ {
3120
+ "value": "5de581bdf2cec034545231fb",
3121
+ "comparison": "eq",
3122
+ "attribute": "listId",
3123
+ "type": "list"
3124
+ },
3125
+ {
3126
+ "value": "5de5818df2cec034545231a2",
3127
+ "comparison": "eq",
3128
+ "attribute": "listId",
3129
+ "type": "list"
3130
+ },
3131
+ {
3132
+ "value": "5dc40cff038a590f79c403c0",
3133
+ "comparison": "eq",
3134
+ "attribute": "listId",
3135
+ "type": "list"
3136
+ },
3137
+ {
3138
+ "type": "list",
3139
+ "attribute": "listId",
3140
+ "comparison": "eq",
3141
+ "value": "5e3d61b624e278106e8f6cf1"
3142
+ },
3143
+ {
3144
+ "type": "list",
3145
+ "attribute": "listId",
3146
+ "comparison": "eq",
3147
+ "value": "5f230805bf972326deafab16"
3148
+ },
3149
+ {
3150
+ "type": "list",
3151
+ "attribute": "listId",
3152
+ "comparison": "eq",
3153
+ "value": "5fc58f3d15ff9110b64ca426"
3154
+ }
3155
+ ],
3156
+ "type": "or"
3157
+ },
3158
+ {
3159
+ "value": "4214932441cb21eebdb396bfe34a8340",
3160
+ "comparison": "eq",
3161
+ "attribute": "assignedTo",
3162
+ "type": "user"
3163
+ }
3164
+ ],
3165
+ "sort": [
3166
+ {
3167
+ "field": "listName",
3168
+ "direction": 1
3169
+ }
3170
+ ],
3171
+ "columns": [
3172
+ "list",
3173
+ "subList",
3174
+ "assignedTo",
3175
+ "dueDate"
3176
+ ]
3177
+ },
3178
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/search/5ddfeab45ff6d925d23c929e",
3179
+ "isPrimary": false,
3180
+ "users": [],
3181
+ "createdBy": {
3182
+ "user": {
3183
+ "id": "4214932441cb21eebdb396bfe34a8340",
3184
+ "name": "Grace Hopper",
3185
+ "userName": "grace",
3186
+ "email": "grace@example.com",
3187
+ "platformDetails": {
3188
+ "name": "slack",
3189
+ "imChannel": "D3EEXS3J6",
3190
+ "selfChannel": "D1HN843U3",
3191
+ "userId": "U0HBQESA1",
3192
+ "teamId": "T0HBUA0TC"
3193
+ },
3194
+ "confirmed": true,
3195
+ "avatar": "https://cdn.workast.io/avatar.png",
3196
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3197
+ }
3198
+ },
3199
+ "createdAt": "2019-11-28T15:41:40.245Z",
3200
+ "updatedAt": "2021-01-14T18:44:34.151Z",
3201
+ "values": {
3202
+ "list": {
3203
+ "5a176b5aa67ba147e5057516": {
3204
+ "id": "5a176b5aa67ba147e5057516",
3205
+ "type": "group",
3206
+ "status": "archived",
3207
+ "privacy": "team",
3208
+ "link": "https://app.workast.com/list/5a176b5aa67ba147e5057516",
3209
+ "name": "Engineering"
3210
+ },
3211
+ "5d7be323c662860f7c97ba12": {
3212
+ "id": "5d7be323c662860f7c97ba12",
3213
+ "type": "group",
3214
+ "status": "archived",
3215
+ "privacy": "team",
3216
+ "link": "https://app.workast.com/list/5d7be323c662860f7c97ba12",
3217
+ "name": "Product"
3218
+ },
3219
+ "5dc40cff038a590f79c403c0": {
3220
+ "id": "5dc40cff038a590f79c403c0",
3221
+ "type": "group",
3222
+ "status": "active",
3223
+ "privacy": "team",
3224
+ "link": "https://app.workast.com/list/5dc40cff038a590f79c403c0",
3225
+ "name": "Product"
3226
+ },
3227
+ "5de5818df2cec034545231a2": {
3228
+ "id": "5de5818df2cec034545231a2",
3229
+ "type": "group",
3230
+ "status": "archived",
3231
+ "privacy": "team",
3232
+ "link": "https://app.workast.com/list/5de5818df2cec034545231a2",
3233
+ "name": "Product"
3234
+ },
3235
+ "5de581bdf2cec034545231fb": {
3236
+ "id": "5de581bdf2cec034545231fb",
3237
+ "type": "group",
3238
+ "status": "archived",
3239
+ "privacy": "team",
3240
+ "link": "https://app.workast.com/list/5de581bdf2cec034545231fb",
3241
+ "name": "Product"
3242
+ },
3243
+ "5e3d61b624e278106e8f6cf1": {
3244
+ "id": "5e3d61b624e278106e8f6cf1",
3245
+ "type": "group",
3246
+ "status": "archived",
3247
+ "privacy": "team",
3248
+ "link": "https://app.workast.com/list/5e3d61b624e278106e8f6cf1",
3249
+ "name": "Product"
3250
+ },
3251
+ "5f230805bf972326deafab16": {
3252
+ "id": "5f230805bf972326deafab16",
3253
+ "type": "group",
3254
+ "status": "active",
3255
+ "privacy": "team",
3256
+ "link": "https://app.workast.com/list/5f230805bf972326deafab16",
3257
+ "name": "Product"
3258
+ },
3259
+ "5fc58f3d15ff9110b64ca426": {
3260
+ "id": "5fc58f3d15ff9110b64ca426",
3261
+ "type": "group",
3262
+ "status": "active",
3263
+ "privacy": "team",
3264
+ "link": "https://app.workast.com/list/5fc58f3d15ff9110b64ca426",
3265
+ "name": "Product"
3266
+ }
3267
+ },
3268
+ "user": {
3269
+ "4214932441cb21eebdb396bfe34a8340": {
3270
+ "id": "4214932441cb21eebdb396bfe34a8340",
3271
+ "name": "Grace Hopper",
3272
+ "userName": "grace",
3273
+ "email": "grace@example.com",
3274
+ "platformDetails": {
3275
+ "name": "slack",
3276
+ "imChannel": "D3EEXS3J6",
3277
+ "selfChannel": "D1HN843U3",
3278
+ "userId": "U0HBQESA1",
3279
+ "teamId": "T0HBUA0TC"
3280
+ },
3281
+ "confirmed": true,
3282
+ "avatar": "https://cdn.workast.io/avatar.png",
3283
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3284
+ }
3285
+ }
3286
+ },
3287
+ "results": {
3288
+ "tasks": [
3289
+ {
3290
+ "status": "pending",
3291
+ "text": "Ship v3",
3292
+ "shortId": "TGNT8",
3293
+ "createdAt": "2026-07-30T11:06:01.976Z",
3294
+ "updatedAt": "2026-08-03T04:47:29.070Z",
3295
+ "listPosition": -400001,
3296
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/11c933fd54aab8cfe9957ab46ccb401f",
3297
+ "calendars": [
3298
+ "4214932441cb21eebdb396bfe34a8340"
3299
+ ],
3300
+ "id": "11c933fd54aab8cfe9957ab46ccb401f",
3301
+ "list": {
3302
+ "id": "5dc40cff038a590f79c403c0",
3303
+ "name": "Development Product",
3304
+ "type": "group",
3305
+ "privacy": "team",
3306
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/space/5dc40cff038a590f79c403c0",
3307
+ "subLists": [
3308
+ {
3309
+ "id": "5dc40d3f7e802c0f93f20232",
3310
+ "name": "Live testing",
3311
+ "listPosition": 1e5,
3312
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3313
+ }
3314
+ ]
3315
+ },
3316
+ "listId": "5dc40cff038a590f79c403c0",
3317
+ "subListId": "5dc40d3f7e802c0f93f20232",
3318
+ "subList": {
3319
+ "id": "5dc40d3f7e802c0f93f20232",
3320
+ "name": "Live testing"
3321
+ },
3322
+ "assignedTo": [
3323
+ {
3324
+ "id": "4214932441cb21eebdb396bfe34a8340",
3325
+ "name": "Grace Hopper",
3326
+ "userName": "grace",
3327
+ "email": "grace@example.com",
3328
+ "platformDetails": {
3329
+ "name": "slack",
3330
+ "imChannel": "D3EEXS3J6",
3331
+ "selfChannel": "D1HN843U3",
3332
+ "userId": "U0HBQESA1",
3333
+ "teamId": "T0HBUA0TC"
3334
+ },
3335
+ "confirmed": true,
3336
+ "avatar": "https://cdn.workast.io/avatar.png",
3337
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3338
+ }
3339
+ ],
3340
+ "subscribers": [
3341
+ {
3342
+ "id": "4214932441cb21eebdb396bfe34a8340",
3343
+ "name": "Grace Hopper",
3344
+ "userName": "grace",
3345
+ "email": "grace@example.com",
3346
+ "platformDetails": {
3347
+ "name": "slack",
3348
+ "imChannel": "D3EEXS3J6",
3349
+ "selfChannel": "D1HN843U3",
3350
+ "userId": "U0HBQESA1",
3351
+ "teamId": "T0HBUA0TC"
3352
+ },
3353
+ "confirmed": true,
3354
+ "avatar": "https://cdn.workast.io/avatar.png",
3355
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3356
+ }
3357
+ ],
3358
+ "allDay": false,
3359
+ "createdBy": {
3360
+ "id": "4214932441cb21eebdb396bfe34a8340",
3361
+ "name": "Grace Hopper",
3362
+ "userName": "grace",
3363
+ "email": "grace@example.com",
3364
+ "platformDetails": {
3365
+ "name": "slack",
3366
+ "imChannel": "D3EEXS3J6",
3367
+ "selfChannel": "D1HN843U3",
3368
+ "userId": "U0HBQESA1",
3369
+ "teamId": "T0HBUA0TC"
3370
+ },
3371
+ "confirmed": true,
3372
+ "avatar": "https://cdn.workast.io/avatar.png",
3373
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3374
+ },
3375
+ "hasDescription": true,
3376
+ "numberOfComments": 0,
3377
+ "numberOfAttachments": 0,
3378
+ "totalSubTasks": 2,
3379
+ "completedSubTasks": 2,
3380
+ "isSubscribed": true,
3381
+ "taskStatus": {
3382
+ "id": "5c7184fa40721e2ed4175a6e",
3383
+ "label": "Open",
3384
+ "color": "#808080",
3385
+ "createdAt": "2019-02-23T17:38:02.928Z",
3386
+ "updatedAt": "2019-02-23T17:38:02.928Z"
3387
+ },
3388
+ "milestones": [],
3389
+ "inHome": false,
3390
+ "fields": []
3391
+ }
3392
+ ],
3393
+ "total": 12,
3394
+ "hiddenTasks": 0
3395
+ }
3396
+ };
3397
+ var searchResults = {
3398
+ "tasks": [
3399
+ {
3400
+ "status": "pending",
3401
+ "text": "Ship v3",
3402
+ "shortId": "T4GNY",
3403
+ "createdAt": "2022-01-10T12:12:46.308Z",
3404
+ "updatedAt": "2025-07-10T08:25:54.460Z",
3405
+ "listPosition": 99999,
3406
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/3634dc043f0d415ec2d307284a3cfe69",
3407
+ "calendars": [
3408
+ "b2956627fe26a2c1e4b6d5202413f779"
3409
+ ],
3410
+ "id": "3634dc043f0d415ec2d307284a3cfe69",
3411
+ "list": {
3412
+ "id": "603449f6f107b67c63e8cee9",
3413
+ "name": "Product",
3414
+ "type": "group",
3415
+ "privacy": "private",
3416
+ "link": "https://app.workast.com/list/603449f6f107b67c63e8cee9",
3417
+ "subLists": [
3418
+ {
3419
+ "id": "603449f6f107b67c63e8cee8",
3420
+ "name": "To-do",
3421
+ "listPosition": 1e5,
3422
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3423
+ },
3424
+ {
3425
+ "id": "610ffd8c7374d6331a4178d8",
3426
+ "name": "In Progress",
3427
+ "listPosition": 7e5,
3428
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3429
+ }
3430
+ ]
3431
+ },
3432
+ "listId": "603449f6f107b67c63e8cee9",
3433
+ "subListId": "610ffd8c7374d6331a4178d8",
3434
+ "subList": {
3435
+ "id": "610ffd8c7374d6331a4178d8",
3436
+ "name": "To-do"
3437
+ },
3438
+ "assignedTo": [
3439
+ {
3440
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3441
+ "name": "Ada Lovelace",
3442
+ "userName": "ada",
3443
+ "email": "ada@example.com",
3444
+ "platformDetails": {
3445
+ "name": "slack",
3446
+ "imChannel": "D3F5RQA6B",
3447
+ "selfChannel": "D1LGYBCFQ",
3448
+ "userId": "U0JU26WRG",
3449
+ "teamId": "T0HBUA0TC"
3450
+ },
3451
+ "confirmed": true,
3452
+ "avatar": "https://cdn.workast.io/avatar.png",
3453
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3454
+ }
3455
+ ],
3456
+ "subscribers": [
3457
+ {
3458
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3459
+ "name": "Ada Lovelace",
3460
+ "userName": "ada",
3461
+ "email": "ada@example.com",
3462
+ "platformDetails": {
3463
+ "name": "slack",
3464
+ "imChannel": "D3F5RQA6B",
3465
+ "selfChannel": "D1LGYBCFQ",
3466
+ "userId": "U0JU26WRG",
3467
+ "teamId": "T0HBUA0TC"
3468
+ },
3469
+ "confirmed": true,
3470
+ "avatar": "https://cdn.workast.io/avatar.png",
3471
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3472
+ }
3473
+ ],
3474
+ "allDay": false,
3475
+ "createdBy": {
3476
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3477
+ "name": "Ada Lovelace",
3478
+ "userName": "ada",
3479
+ "email": "ada@example.com",
3480
+ "platformDetails": {
3481
+ "name": "slack",
3482
+ "imChannel": "D3F5RQA6B",
3483
+ "selfChannel": "D1LGYBCFQ",
3484
+ "userId": "U0JU26WRG",
3485
+ "teamId": "T0HBUA0TC"
3486
+ },
3487
+ "confirmed": true,
3488
+ "avatar": "https://cdn.workast.io/avatar.png",
3489
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3490
+ },
3491
+ "hasDescription": true,
3492
+ "numberOfComments": 1,
3493
+ "numberOfAttachments": 0,
3494
+ "totalSubTasks": 1,
3495
+ "completedSubTasks": 0,
3496
+ "isSubscribed": true,
3497
+ "lastComment": {
3498
+ "id": "686f7912fc2fef09733c6f58",
3499
+ "type": "comment",
3500
+ "value": "Standup",
3501
+ "status": "active",
3502
+ "createdAt": "2025-07-10T08:25:54.274Z",
3503
+ "updatedAt": "2025-07-10T08:25:54.274Z",
3504
+ "mentions": [
3505
+ {
3506
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3507
+ "name": "Ada Lovelace",
3508
+ "userName": "ada",
3509
+ "email": "ada@example.com",
3510
+ "platformDetails": {
3511
+ "name": "slack",
3512
+ "imChannel": "D3F5RQA6B",
3513
+ "selfChannel": "D1LGYBCFQ",
3514
+ "userId": "U0JU26WRG",
3515
+ "teamId": "T0HBUA0TC"
3516
+ },
3517
+ "confirmed": true,
3518
+ "avatar": "https://cdn.workast.io/avatar.png",
3519
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3520
+ }
3521
+ ],
3522
+ "reactions": [],
3523
+ "actor": {
3524
+ "type": "User",
3525
+ "data": {
3526
+ "id": "4214932441cb21eebdb396bfe34a8340",
3527
+ "name": "Grace Hopper",
3528
+ "userName": "grace",
3529
+ "email": "grace@example.com",
3530
+ "platformDetails": {
3531
+ "name": "slack",
3532
+ "imChannel": "D3EEXS3J6",
3533
+ "selfChannel": "D1HN843U3",
3534
+ "userId": "U0HBQESA1",
3535
+ "teamId": "T0HBUA0TC"
3536
+ },
3537
+ "confirmed": true,
3538
+ "avatar": "https://cdn.workast.io/avatar.png",
3539
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3540
+ }
3541
+ }
3542
+ },
3543
+ "taskStatus": {
3544
+ "id": "5c7184fa40721e2ed4175a6e",
3545
+ "label": "Open",
3546
+ "color": "#808080",
3547
+ "createdAt": "2019-02-23T17:38:02.928Z",
3548
+ "updatedAt": "2019-02-23T17:38:02.928Z"
3549
+ },
3550
+ "milestones": [],
3551
+ "inHome": false,
3552
+ "fields": []
3553
+ }
3554
+ ],
3555
+ "total": 441,
3556
+ "hiddenTasks": 0
3557
+ };
3558
+ var searches = {
3559
+ "searches": [
3560
+ {
3561
+ "id": "5ddfeab45ff6d925d23c929e",
3562
+ "name": "Ship v3",
3563
+ "custom": true,
3564
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/search/5ddfeab45ff6d925d23c929e",
3565
+ "usersCount": 0,
3566
+ "createdBy": {
3567
+ "user": "4214932441cb21eebdb396bfe34a8340"
3568
+ },
3569
+ "createdAt": "2019-11-28T15:41:40.245Z",
3570
+ "updatedAt": "2021-01-14T18:44:34.151Z"
3571
+ }
3572
+ ],
3573
+ "total": 3
3574
+ };
3575
+ var subList = {
3576
+ "id": "5a6ebde81519395731f90e30",
3577
+ "name": "To-do",
3578
+ "listPosition": 1e5,
3579
+ "createdBy": "b2956627fe26a2c1e4b6d5202413f779"
3580
+ };
3581
+ var tag = {
3582
+ "id": "5a6227d69f0cec2676083529",
3583
+ "name": "Feature",
3584
+ "color": "#61bd4f"
3585
+ };
3586
+ var task = {
3587
+ "id": "3634dc043f0d415ec2d307284a3cfe69",
3588
+ "createdAt": "2022-01-10T12:12:46.308Z",
3589
+ "createdBy": {
3590
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3591
+ "createdAt": "2016-12-28T22:19:45.715Z",
3592
+ "name": "Ada Lovelace",
3593
+ "userName": "ada",
3594
+ "platformDetails": {
3595
+ "name": "slack",
3596
+ "imChannel": "D3F5RQA6B",
3597
+ "selfChannel": "D1LGYBCFQ",
3598
+ "userId": "U0JU26WRG",
3599
+ "teamId": "T0HBUA0TC"
3600
+ },
3601
+ "timezone": "Australia/Canberra",
3602
+ "email": "ada@example.com",
3603
+ "lastActive": "2025-07-10T01:22:15.814Z",
3604
+ "role": "admin",
3605
+ "status": "active",
3606
+ "confirmed": true,
3607
+ "profile": {},
3608
+ "avatar": "https://cdn.workast.io/avatar.png",
3609
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3610
+ },
3611
+ "shortId": "T4GNY",
3612
+ "text": "Ship v3",
3613
+ "assignedTo": [
3614
+ {
3615
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3616
+ "createdAt": "2016-12-28T22:19:45.715Z",
3617
+ "name": "Ada Lovelace",
3618
+ "userName": "ada",
3619
+ "platformDetails": {
3620
+ "name": "slack",
3621
+ "imChannel": "D3F5RQA6B",
3622
+ "selfChannel": "D1LGYBCFQ",
3623
+ "userId": "U0JU26WRG",
3624
+ "teamId": "T0HBUA0TC"
3625
+ },
3626
+ "timezone": "Australia/Canberra",
3627
+ "email": "ada@example.com",
3628
+ "lastActive": "2025-07-10T01:22:15.814Z",
3629
+ "role": "admin",
3630
+ "status": "active",
3631
+ "confirmed": true,
3632
+ "profile": {},
3633
+ "avatar": "https://cdn.workast.io/avatar.png",
3634
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3635
+ }
3636
+ ],
3637
+ "subscribers": [
3638
+ {
3639
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3640
+ "createdAt": "2016-12-28T22:19:45.715Z",
3641
+ "name": "Ada Lovelace",
3642
+ "userName": "ada",
3643
+ "platformDetails": {
3644
+ "name": "slack",
3645
+ "imChannel": "D3F5RQA6B",
3646
+ "selfChannel": "D1LGYBCFQ",
3647
+ "userId": "U0JU26WRG",
3648
+ "teamId": "T0HBUA0TC"
3649
+ },
3650
+ "timezone": "Australia/Canberra",
3651
+ "email": "ada@example.com",
3652
+ "lastActive": "2025-07-10T01:22:15.814Z",
3653
+ "role": "admin",
3654
+ "status": "active",
3655
+ "confirmed": true,
3656
+ "profile": {},
3657
+ "avatar": "https://cdn.workast.io/avatar.png",
3658
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3659
+ },
3660
+ {
3661
+ "id": "4214932441cb21eebdb396bfe34a8340",
3662
+ "createdAt": "2017-04-14T02:14:44.247Z",
3663
+ "name": "Grace Hopper",
3664
+ "userName": "grace",
3665
+ "platformDetails": {
3666
+ "name": "slack",
3667
+ "imChannel": "D3EEXS3J6",
3668
+ "selfChannel": "D1HN843U3",
3669
+ "userId": "U0HBQESA1",
3670
+ "teamId": "T0HBUA0TC"
3671
+ },
3672
+ "timezone": "Australia/Canberra",
3673
+ "email": "grace@example.com",
3674
+ "lastActive": "2026-08-18T11:29:00.207Z",
3675
+ "role": "admin",
3676
+ "status": "active",
3677
+ "confirmed": true,
3678
+ "profile": {},
3679
+ "avatar": "https://cdn.workast.io/avatar.png",
3680
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3681
+ }
3682
+ ],
3683
+ "status": "pending",
3684
+ "allDay": false,
3685
+ "priority": 0,
3686
+ "description": "Ship v3",
3687
+ "listId": "603449f6f107b67c63e8cee9",
3688
+ "list": {
3689
+ "id": "603449f6f107b67c63e8cee9",
3690
+ "hash": "fabc9069cda279d762400d53e2854266",
3691
+ "name": "Product",
3692
+ "avatar": "https://cdn.workast.io/list-avatar.png",
3693
+ "numberOfParticipants": 2,
3694
+ "type": "group",
3695
+ "privacy": "private",
3696
+ "isArchived": false,
3697
+ "platformDetails": {
3698
+ "name": "slack",
3699
+ "channelId": "G01NLRJ053L",
3700
+ "channelName": "engineering",
3701
+ "type": "group",
3702
+ "teamId": "T0HBUA0TC"
3703
+ },
3704
+ "platformNotifications": {
3705
+ "taskCreated": true,
3706
+ "taskCompleted": true
3707
+ },
3708
+ "subLists": [
3709
+ {
3710
+ "id": "603449f6f107b67c63e8cee8",
3711
+ "name": "To-do",
3712
+ "listPosition": 1e5,
3713
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3714
+ },
3715
+ {
3716
+ "id": "610ffd8c7374d6331a4178d8",
3717
+ "name": "In Progress",
3718
+ "listPosition": 7e5,
3719
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3720
+ }
3721
+ ],
3722
+ "defaultSubList": "603449f6f107b67c63e8cee8",
3723
+ "isParticipant": true,
3724
+ "link": "https://app.workast.com/list/603449f6f107b67c63e8cee9"
3725
+ },
3726
+ "listPosition": 99999,
3727
+ "subList": {
3728
+ "id": "610ffd8c7374d6331a4178d8",
3729
+ "name": "To-do",
3730
+ "listPosition": 7e5,
3731
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3732
+ },
3733
+ "subListId": "610ffd8c7374d6331a4178d8",
3734
+ "subTasks": [
3735
+ {
3736
+ "status": "pending",
3737
+ "text": "Ship v3",
3738
+ "shortId": "T4QMF",
3739
+ "createdAt": "2022-01-10T12:15:13.627Z",
3740
+ "updatedAt": "2022-01-10T12:19:50.379Z",
3741
+ "listPosition": 1e5,
3742
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/7cec8c8604790b391221049f28d5ba40",
3743
+ "calendars": [
3744
+ "b2956627fe26a2c1e4b6d5202413f779"
3745
+ ],
3746
+ "id": "7cec8c8604790b391221049f28d5ba40",
3747
+ "list": {
3748
+ "id": "603449f6f107b67c63e8cee9",
3749
+ "name": "Product",
3750
+ "type": "group",
3751
+ "privacy": "private",
3752
+ "link": "https://app.workast.com/list/603449f6f107b67c63e8cee9",
3753
+ "subLists": [
3754
+ {
3755
+ "id": "603449f6f107b67c63e8cee8",
3756
+ "name": "To-do",
3757
+ "listPosition": 1e5,
3758
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3759
+ },
3760
+ {
3761
+ "id": "610ffd8c7374d6331a4178d8",
3762
+ "name": "In Progress",
3763
+ "listPosition": 7e5,
3764
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
3765
+ }
3766
+ ]
3767
+ },
3768
+ "listId": "603449f6f107b67c63e8cee9",
3769
+ "parent": {
3770
+ "id": "3634dc043f0d415ec2d307284a3cfe69",
3771
+ "text": "Ship v3",
3772
+ "shortId": "T4GNY",
3773
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/3634dc043f0d415ec2d307284a3cfe69"
3774
+ },
3775
+ "assignedTo": [],
3776
+ "subscribers": [
3777
+ {
3778
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3779
+ "name": "Ada Lovelace",
3780
+ "userName": "ada",
3781
+ "email": "ada@example.com",
3782
+ "platformDetails": {
3783
+ "name": "slack",
3784
+ "imChannel": "D3F5RQA6B",
3785
+ "selfChannel": "D1LGYBCFQ",
3786
+ "userId": "U0JU26WRG",
3787
+ "teamId": "T0HBUA0TC"
3788
+ },
3789
+ "confirmed": true,
3790
+ "avatar": "https://cdn.workast.io/avatar.png",
3791
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3792
+ }
3793
+ ],
3794
+ "allDay": false,
3795
+ "createdBy": {
3796
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3797
+ "name": "Ada Lovelace",
3798
+ "userName": "ada",
3799
+ "email": "ada@example.com",
3800
+ "platformDetails": {
3801
+ "name": "slack",
3802
+ "imChannel": "D3F5RQA6B",
3803
+ "selfChannel": "D1LGYBCFQ",
3804
+ "userId": "U0JU26WRG",
3805
+ "teamId": "T0HBUA0TC"
3806
+ },
3807
+ "confirmed": true,
3808
+ "avatar": "https://cdn.workast.io/avatar.png",
3809
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3810
+ },
3811
+ "hasDescription": true,
3812
+ "numberOfComments": 0,
3813
+ "numberOfAttachments": 0,
3814
+ "subTasks": [],
3815
+ "isSubscribed": false,
3816
+ "taskStatus": {
3817
+ "id": "5c7184fa40721e2ed4175a6e",
3818
+ "label": "Open",
3819
+ "color": "#808080",
3820
+ "createdAt": "2019-02-23T17:38:02.928Z",
3821
+ "updatedAt": "2019-02-23T17:38:02.928Z"
3822
+ },
3823
+ "inHome": false,
3824
+ "fields": []
3825
+ }
3826
+ ],
3827
+ "attachments": [],
3828
+ "totalSubTasks": 1,
3829
+ "completedSubTasks": 0,
3830
+ "numberOfComments": 1,
3831
+ "lastComment": {
3832
+ "id": "686f7912fc2fef09733c6f58",
3833
+ "type": "comment",
3834
+ "value": "Ship v3",
3835
+ "status": "active",
3836
+ "createdAt": "2025-07-10T08:25:54.274Z",
3837
+ "updatedAt": "2025-07-10T08:25:54.274Z",
3838
+ "mentions": [
3839
+ {
3840
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3841
+ "name": "Ada Lovelace",
3842
+ "userName": "ada",
3843
+ "email": "ada@example.com",
3844
+ "platformDetails": {
3845
+ "name": "slack",
3846
+ "imChannel": "D3F5RQA6B",
3847
+ "selfChannel": "D1LGYBCFQ",
3848
+ "userId": "U0JU26WRG",
3849
+ "teamId": "T0HBUA0TC"
3850
+ },
3851
+ "confirmed": true,
3852
+ "avatar": "https://cdn.workast.io/avatar.png",
3853
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3854
+ }
3855
+ ],
3856
+ "reactions": [],
3857
+ "actor": {
3858
+ "type": "User",
3859
+ "data": {
3860
+ "id": "4214932441cb21eebdb396bfe34a8340",
3861
+ "name": "Grace Hopper",
3862
+ "userName": "grace",
3863
+ "email": "grace@example.com",
3864
+ "platformDetails": {
3865
+ "name": "slack",
3866
+ "imChannel": "D3EEXS3J6",
3867
+ "selfChannel": "D1HN843U3",
3868
+ "userId": "U0HBQESA1",
3869
+ "teamId": "T0HBUA0TC"
3870
+ },
3871
+ "confirmed": true,
3872
+ "avatar": "https://cdn.workast.io/avatar.png",
3873
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3874
+ }
3875
+ }
3876
+ },
3877
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/3634dc043f0d415ec2d307284a3cfe69",
3878
+ "dependencies": [],
3879
+ "milestones": [],
3880
+ "inHome": false,
3881
+ "fields": [
3882
+ {
3883
+ "id": "620120d5106d941d2ac206c7",
3884
+ "name": "Priority",
3885
+ "description": "Ship v3",
3886
+ "type": "options",
3887
+ "useAsTaskColor": false,
3888
+ "options": [
3889
+ {
3890
+ "id": "620120d5106d941d2ac206c8",
3891
+ "name": "Yes",
3892
+ "color": "#2ef00d"
3893
+ },
3894
+ {
3895
+ "id": "620120d5106d941d2ac206c9",
3896
+ "name": "No",
3897
+ "color": "#ee0551"
3898
+ }
3899
+ ],
3900
+ "value": ""
3901
+ }
3902
+ ],
3903
+ "calendars": [
3904
+ "b2956627fe26a2c1e4b6d5202413f779"
3905
+ ]
3906
+ };
3907
+ var taskActivities = {
3908
+ "activities": [
3909
+ {
3910
+ "id": "61dc22bee45fbc0e26ca342d",
3911
+ "type": "task_created",
3912
+ "createdAt": "2022-01-10T12:12:46.500Z",
3913
+ "updatedAt": "2022-01-10T12:12:46.500Z",
3914
+ "mentions": [],
3915
+ "actor": {
3916
+ "type": "User",
3917
+ "data": {
3918
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3919
+ "name": "Ada Lovelace",
3920
+ "userName": "ada",
3921
+ "email": "ada@example.com",
3922
+ "platformDetails": {
3923
+ "name": "slack",
3924
+ "imChannel": "D3F5RQA6B",
3925
+ "selfChannel": "D1LGYBCFQ",
3926
+ "userId": "U0JU26WRG",
3927
+ "teamId": "T0HBUA0TC"
3928
+ },
3929
+ "confirmed": true,
3930
+ "avatar": "https://cdn.workast.io/avatar.png",
3931
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3932
+ }
3933
+ },
3934
+ "userFriendlyContent": {
3935
+ "task": {
3936
+ "id": "3634dc043f0d415ec2d307284a3cfe69",
3937
+ "shortId": "T4GNY",
3938
+ "status": "pending",
3939
+ "subscribers": [
3940
+ "b2956627fe26a2c1e4b6d5202413f779",
3941
+ "4214932441cb21eebdb396bfe34a8340"
3942
+ ],
3943
+ "calendars": [
3944
+ "b2956627fe26a2c1e4b6d5202413f779"
3945
+ ],
3946
+ "text": "Ship v3",
3947
+ "description": "Ship v3",
3948
+ "subListId": "610ffd8c7374d6331a4178d8",
3949
+ "listId": "603449f6f107b67c63e8cee9",
3950
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49/task/3634dc043f0d415ec2d307284a3cfe69",
3951
+ "allDay": false,
3952
+ "createdBy": {
3953
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3954
+ "createdAt": "2016-12-28T22:19:45.715Z",
3955
+ "name": "Ada Lovelace",
3956
+ "userName": "ada",
3957
+ "platformDetails": {
3958
+ "name": "slack",
3959
+ "imChannel": "D3F5RQA6B",
3960
+ "selfChannel": "D1LGYBCFQ",
3961
+ "userId": "U0JU26WRG",
3962
+ "teamId": "T0HBUA0TC"
3963
+ },
3964
+ "timezone": "Australia/Canberra",
3965
+ "email": "ada@example.com",
3966
+ "lastActive": "2025-07-10T01:22:15.814Z",
3967
+ "role": "admin",
3968
+ "status": "active",
3969
+ "confirmed": true,
3970
+ "profile": {},
3971
+ "avatar": "https://cdn.workast.io/avatar.png",
3972
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3973
+ },
3974
+ "assignedTo": [
3975
+ {
3976
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
3977
+ "createdAt": "2016-12-28T22:19:45.715Z",
3978
+ "name": "Ada Lovelace",
3979
+ "userName": "ada",
3980
+ "platformDetails": {
3981
+ "name": "slack",
3982
+ "imChannel": "D3F5RQA6B",
3983
+ "selfChannel": "D1LGYBCFQ",
3984
+ "userId": "U0JU26WRG",
3985
+ "teamId": "T0HBUA0TC"
3986
+ },
3987
+ "timezone": "Australia/Canberra",
3988
+ "email": "ada@example.com",
3989
+ "lastActive": "2025-07-10T01:22:15.814Z",
3990
+ "role": "admin",
3991
+ "status": "active",
3992
+ "confirmed": true,
3993
+ "profile": {},
3994
+ "avatar": "https://cdn.workast.io/avatar.png",
3995
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
3996
+ }
3997
+ ]
3998
+ },
3999
+ "list": {
4000
+ "id": "603449f6f107b67c63e8cee9",
4001
+ "name": "Product",
4002
+ "link": "https://app.workast.com/list/603449f6f107b67c63e8cee9",
4003
+ "subLists": [
4004
+ {
4005
+ "id": "603449f6f107b67c63e8cee8",
4006
+ "name": "To-do",
4007
+ "listPosition": 1e5,
4008
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
4009
+ },
4010
+ {
4011
+ "id": "610ffd8c7374d6331a4178d8",
4012
+ "name": "In Progress",
4013
+ "listPosition": 7e5,
4014
+ "createdBy": "4214932441cb21eebdb396bfe34a8340"
4015
+ }
4016
+ ],
4017
+ "platformDetails": {
4018
+ "name": "slack",
4019
+ "channelId": "G01NLRJ053L",
4020
+ "channelName": "engineering",
4021
+ "type": "group",
4022
+ "teamId": "T0HBUA0TC"
4023
+ }
4024
+ },
4025
+ "actor": {
4026
+ "type": "User",
4027
+ "id": {
4028
+ "id": "b2956627fe26a2c1e4b6d5202413f779",
4029
+ "name": "Ada Lovelace",
4030
+ "userName": "ada",
4031
+ "email": "ada@example.com",
4032
+ "platformDetails": {
4033
+ "name": "slack",
4034
+ "imChannel": "D3F5RQA6B",
4035
+ "selfChannel": "D1LGYBCFQ",
4036
+ "userId": "U0JU26WRG",
4037
+ "teamId": "T0HBUA0TC"
4038
+ },
4039
+ "confirmed": true,
4040
+ "avatar": "https://cdn.workast.io/avatar.png",
4041
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
4042
+ }
4043
+ },
4044
+ "message": "{{actor}} created the task {{task}}"
4045
+ }
4046
+ }
4047
+ ],
4048
+ "total": 17
4049
+ };
4050
+ var taskBulkUpdateResult = {
4051
+ "modified": [
4052
+ "3634dc043f0d415ec2d307284a3cfe69"
4053
+ ],
4054
+ "error": []
4055
+ };
4056
+ var tokenDetails = {
4057
+ "app": {
4058
+ "id": "5d9a6b09269e415d36380d23",
4059
+ "name": "Example App"
4060
+ },
4061
+ "user": {
4062
+ "id": "4214932441cb21eebdb396bfe34a8340",
4063
+ "name": "Grace Hopper"
4064
+ },
4065
+ "team": {
4066
+ "id": "ca19601b6bb816ca95386698b3385d49",
4067
+ "name": "Example Team"
4068
+ }
4069
+ };
4070
+ var user = {
4071
+ "id": "4214932441cb21eebdb396bfe34a8340",
4072
+ "virtualId": "c2xhY2svL1QwSEJVQTBUQzpVMEhCUUVTQTE=",
4073
+ "name": "Grace Hopper",
4074
+ "userName": "grace",
4075
+ "avatar": "https://cdn.workast.io/avatar.png"
4076
+ };
4077
+ var userDetail = {
4078
+ "id": "4214932441cb21eebdb396bfe34a8340",
4079
+ "createdAt": "2017-04-14T02:14:44.247Z",
4080
+ "name": "Grace Hopper",
4081
+ "userName": "grace",
4082
+ "platformDetails": {
4083
+ "name": "slack",
4084
+ "imChannel": "D3EEXS3J6",
4085
+ "selfChannel": "D1HN843U3",
4086
+ "userId": "U0HBQESA1",
4087
+ "teamId": "T0HBUA0TC"
4088
+ },
4089
+ "timezone": "Australia/Canberra",
4090
+ "email": "grace@example.com",
4091
+ "lastActive": "2026-08-18T11:29:00.207Z",
4092
+ "role": "admin",
4093
+ "status": "active",
4094
+ "confirmed": true,
4095
+ "profile": {},
4096
+ "avatar": "https://cdn.workast.io/avatar.png",
4097
+ "costCenter": "5c1b92b0a57d2b342c1a610e"
4098
+ };
4099
+ var userDetailWithTeam = {
4100
+ "id": "4214932441cb21eebdb396bfe34a8340",
4101
+ "createdAt": "2017-04-14T02:14:44.247Z",
4102
+ "name": "Grace Hopper",
4103
+ "userName": "grace",
4104
+ "platformDetails": {
4105
+ "name": "slack",
4106
+ "imChannel": "D3EEXS3J6",
4107
+ "selfChannel": "D1HN843U3",
4108
+ "userId": "U0HBQESA1",
4109
+ "teamId": "T0HBUA0TC"
4110
+ },
4111
+ "timezone": "Australia/Canberra",
4112
+ "email": "grace@example.com",
4113
+ "lastActive": "2026-08-18T11:29:00.207Z",
4114
+ "role": "admin",
4115
+ "status": "active",
4116
+ "confirmed": true,
4117
+ "profile": {},
4118
+ "avatar": "https://cdn.workast.io/avatar.png",
4119
+ "costCenter": "5c1b92b0a57d2b342c1a610e",
4120
+ "team": {
4121
+ "id": "ca19601b6bb816ca95386698b3385d49",
4122
+ "name": "Example Team",
4123
+ "url": "https://app.workast.com",
4124
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49",
4125
+ "domain": "example",
4126
+ "totalTasks": 54822,
4127
+ "status": "active",
4128
+ "createdAt": "2018-05-22T14:04:01.652Z",
4129
+ "betaTester": true,
4130
+ "platformDetails": {
4131
+ "name": "slack",
4132
+ "teamId": "T0HBUA0TC",
4133
+ "url": "https://example.slack.com/",
4134
+ "emailDomain": "example.com",
4135
+ "teamSize": 76
4136
+ },
4137
+ "icon": "https://cdn.workast.io/list-avatar.png"
4138
+ }
4139
+ };
4140
+ var userResource = {
4141
+ "id": "4214932441cb21eebdb396bfe34a8340",
4142
+ "name": "Grace Hopper",
4143
+ "email": "grace@example.com",
4144
+ "userName": "grace",
4145
+ "platformDetails": {
4146
+ "name": "slack",
4147
+ "imChannel": "D3EEXS3J6",
4148
+ "selfChannel": "D1HN843U3",
4149
+ "userId": "U0HBQESA1",
4150
+ "teamId": "T0HBUA0TC"
4151
+ },
4152
+ "role": "admin",
4153
+ "confirmed": true,
4154
+ "avatar": "https://cdn.workast.io/avatar.png",
4155
+ "personalListId": "5937861aa2470108bbf72e1d",
4156
+ "team": {
4157
+ "id": "ca19601b6bb816ca95386698b3385d49",
4158
+ "name": "Example Team",
4159
+ "url": "https://app.workast.com",
4160
+ "link": "https://open.workast.app/ca19601b6bb816ca95386698b3385d49",
4161
+ "domain": "example",
4162
+ "totalTasks": 54822,
4163
+ "status": "active",
4164
+ "createdAt": "2018-05-22T14:04:01.652Z",
4165
+ "betaTester": true,
4166
+ "platformDetails": {
4167
+ "name": "slack",
4168
+ "teamId": "T0HBUA0TC",
4169
+ "url": "https://example.slack.com/",
4170
+ "emailDomain": "example.com",
4171
+ "teamSize": 76
4172
+ },
4173
+ "icon": "https://cdn.workast.io/list-avatar.png",
4174
+ "activeUsers": 7
4175
+ },
4176
+ "organization": {
4177
+ "id": "5c1b92b0a57d2b342c1a610d",
4178
+ "name": "Example Organization",
4179
+ "defaultCostCenter": "5c1b92b0a57d2b342c1a610e"
4180
+ },
4181
+ "costCenter": {
4182
+ "id": "5c1b92b0a57d2b342c1a610e",
4183
+ "createdAt": "2018-12-20T13:01:36.566Z",
4184
+ "updatedAt": "2019-01-10T14:56:47.968Z",
4185
+ "name": "Default",
4186
+ "account": "premium",
4187
+ "createdBy": "c51a9c1a2ddfbcefa7abf74036e0c616",
4188
+ "product": {
4189
+ "id": "5ddfe4b458ddf740a5393ae9",
4190
+ "createdAt": "2019-11-28T15:16:04.653Z",
4191
+ "updatedAt": "2020-07-30T14:55:46.510Z",
4192
+ "name": "Professional",
4193
+ "default": false,
4194
+ "isPaid": true,
4195
+ "features": {
4196
+ "createSubtasks": true,
4197
+ "createPrivateSpaces": true,
4198
+ "createLists": true,
4199
+ "createTags": true,
4200
+ "importTemplates": true,
4201
+ "createTemplates": true,
4202
+ "createSearches": true,
4203
+ "createTaskStatus": true,
4204
+ "createGuestAccounts": true,
4205
+ "createTaskDependencies": true,
4206
+ "storageLimit": 5368709120,
4207
+ "createMilestones": true,
4208
+ "accessMeetings": true,
4209
+ "calendarSync": true,
4210
+ "downloadSearch": true,
4211
+ "createSpaces": true,
4212
+ "appLogin": true,
4213
+ "createFields": true,
4214
+ "timelineView": true,
4215
+ "aiWorkflows": true,
4216
+ "notetakerMinutesPerMonth": 600
4217
+ },
4218
+ "trialling": false,
4219
+ "currentPlan": {
4220
+ "id": "5ddfe4b458ddf740a5393aea",
4221
+ "term": "annual",
4222
+ "price": 9.95,
4223
+ "flatFee": false
4224
+ }
4225
+ },
4226
+ "storage": {
4227
+ "used": 2315908683,
4228
+ "total": 37580963840,
4229
+ "usedPercentage": 6.16,
4230
+ "freePercentage": 93.84
4231
+ },
4232
+ "isDefault": true,
4233
+ "activeUsers": 7
4234
+ },
4235
+ "calendars": [],
4236
+ "timezone": "Australia/Canberra",
4237
+ "reminders": {
4238
+ "channels": {
4239
+ "slack": true,
4240
+ "email": false
4241
+ },
4242
+ "days": [
4243
+ 1,
4244
+ 2,
4245
+ 3,
4246
+ 4,
4247
+ 5
4248
+ ],
4249
+ "hour": 9,
4250
+ "hourUTC": 23,
4251
+ "taskAssignedToOthers": false,
4252
+ "taskDueInTheFutureDays": 0
4253
+ },
4254
+ "notifications": {
4255
+ "assignedToTasks": true,
4256
+ "completedTasks": true,
4257
+ "appAnnouncements": true,
4258
+ "taskReminderMinutes": 30
4259
+ },
4260
+ "dateSettings": {
4261
+ "startOfWeek": "monday",
4262
+ "timeFormat": "HH",
4263
+ "dateFormat": "M/D/Y"
4264
+ },
4265
+ "myTasksSearchSettings": {
4266
+ "excludeAssignToOthers": true,
4267
+ "excludedLists": [
4268
+ {
4269
+ "id": "5937861aa2470108bbf72e1d",
4270
+ "name": "Personal tasks",
4271
+ "type": "personal",
4272
+ "privacy": "private"
4273
+ },
4274
+ {
4275
+ "id": "59daaf15c7d6260e7f470356",
4276
+ "name": "Product",
4277
+ "type": "group",
4278
+ "privacy": "team"
4279
+ }
4280
+ ]
4281
+ },
4282
+ "profile": {},
4283
+ "storage": {
4284
+ "used": 627473089,
4285
+ "total": 5368709120,
4286
+ "usedPercentage": 11.69,
4287
+ "freePercentage": 88.31
4288
+ }
4289
+ };
4290
+ var workflow = {
4291
+ "id": "673b14ef1231f8099d5c96a4",
4292
+ "trigger": {
4293
+ "name": "event",
4294
+ "value": "task_created"
4295
+ },
4296
+ "prompt": "Ship v3",
4297
+ "lists": [
4298
+ {
4299
+ "id": "673b0b7b1231f8099d5ba067",
4300
+ "type": "group",
4301
+ "status": "archived",
4302
+ "privacy": "team",
4303
+ "link": "https://app.workast.com/list/673b0b7b1231f8099d5ba067",
4304
+ "name": "Engineering"
4305
+ }
4306
+ ],
4307
+ "status": "active"
4308
+ };
4309
+ var workflowDetail = {
4310
+ "id": "673b14ef1231f8099d5c96a4",
4311
+ "trigger": {
4312
+ "name": "event",
4313
+ "value": "task_created"
4314
+ },
4315
+ "prompt": "Ship v3",
4316
+ "lists": [
4317
+ {
4318
+ "id": "673b0b7b1231f8099d5ba067",
4319
+ "type": "group",
4320
+ "status": "archived",
4321
+ "privacy": "team",
4322
+ "link": "https://app.workast.com/list/673b0b7b1231f8099d5ba067",
4323
+ "name": "Engineering"
4324
+ }
4325
+ ],
4326
+ "status": "active",
4327
+ "runs": [
4328
+ {
4329
+ "id": "673bffe012f608759e4bebca",
4330
+ "result": "Ship v3",
4331
+ "activity": {
4332
+ "id": "673bffdc77ac5a0996dc537d",
4333
+ "task": {
4334
+ "id": "e1bb3fcad526680b6e7387e988fea1d9",
4335
+ "text": "Ship v3",
4336
+ "shortId": "T31UJ",
4337
+ "link": "https://app.workast.com/task/e1bb3fcad526680b6e7387e988fea1d9"
4338
+ }
4339
+ },
4340
+ "createdAt": "2024-11-19T03:02:56.261Z"
4341
+ }
4342
+ ],
4343
+ "totalRuns": 4
4344
+ };
4345
+ var workflows = {
4346
+ "workflows": [
4347
+ {
4348
+ "id": "673b14ef1231f8099d5c96a4",
4349
+ "trigger": {
4350
+ "name": "event",
4351
+ "value": "task_created"
4352
+ },
4353
+ "prompt": "Ship v3",
4354
+ "lists": [
4355
+ {
4356
+ "id": "673b0b7b1231f8099d5ba067",
4357
+ "type": "group",
4358
+ "status": "archived",
4359
+ "privacy": "team",
4360
+ "link": "https://app.workast.com/list/673b0b7b1231f8099d5ba067",
4361
+ "name": "Engineering"
4362
+ }
4363
+ ],
4364
+ "status": "active"
4365
+ }
4366
+ ],
4367
+ "total": 11
4368
+ };
4369
+
4370
+ // src/mock.ts
4371
+ var errors = {
4372
+ unauthorized: new AuthenticationError("Unauthorized"),
4373
+ forbidden: new PermissionError("Forbidden"),
4374
+ notFound: new NotFoundError("Not found"),
4375
+ validation: new ValidationError("Validation failed")
4376
+ };
4377
+ var ROOT_KEYS = /* @__PURE__ */ new Set(["calls", "pending", "reset", "restore"]);
4378
+ var active = null;
4379
+ var patches = [];
4380
+ function canonicalize(value) {
4381
+ if (Array.isArray(value)) {
4382
+ return value.map(canonicalize);
4383
+ }
4384
+ if (value !== null && typeof value === "object") {
4385
+ const result = {};
4386
+ for (const key of Object.keys(value).sort()) {
4387
+ result[key] = canonicalize(value[key]);
4388
+ }
4389
+ return result;
4390
+ }
4391
+ return value;
4392
+ }
4393
+ function valuesEqual(left, right) {
4394
+ return JSON.stringify(canonicalize(left)) === JSON.stringify(canonicalize(right));
4395
+ }
4396
+ function argsMatch(expected, actual) {
4397
+ if (expected.length === 1 && typeof expected[0] === "function") {
4398
+ return expected[0](...actual) === true;
4399
+ }
4400
+ if (expected.length > actual.length) {
4401
+ return false;
4402
+ }
4403
+ for (let i = 0; i < expected.length; i += 1) {
4404
+ const slot = expected[i];
4405
+ if (typeof slot === "function") {
4406
+ if (slot(actual[i]) !== true) {
4407
+ return false;
4408
+ }
4409
+ } else if (!valuesEqual(slot, actual[i])) {
4410
+ return false;
4411
+ }
4412
+ }
4413
+ return true;
4414
+ }
4415
+ function findInterceptor(session, method, actual) {
4416
+ return session.interceptors.find(
4417
+ (interceptor) => !interceptor.used && interceptor.method === method && argsMatch(interceptor.expectedArgs, actual)
4418
+ );
4419
+ }
4420
+ function pendingMethods(session) {
4421
+ return session.interceptors.filter((interceptor) => !interceptor.used).map((interceptor) => interceptor.method);
4422
+ }
4423
+ function wrapMethod(proto, key, method) {
4424
+ const record = proto;
4425
+ const original = record[key];
4426
+ if (typeof original !== "function") {
4427
+ return;
4428
+ }
4429
+ if (patches.some((patch) => patch.proto === record && patch.key === key)) {
4430
+ return;
4431
+ }
4432
+ record[key] = async function patched(...args) {
4433
+ if (!active) {
4434
+ return original.apply(this, args);
4435
+ }
4436
+ active.calls.push({ method, args });
4437
+ const interceptor = findInterceptor(active, method, args);
4438
+ if (!interceptor) {
4439
+ const pending = pendingMethods(active).join(", ") || "(none)";
4440
+ throw new Error(`No pending interceptor for ${method}. Pending: ${pending}`);
4441
+ }
4442
+ interceptor.used = true;
4443
+ if (interceptor.error) {
4444
+ throw interceptor.error;
4445
+ }
4446
+ return interceptor.value;
4447
+ };
4448
+ patches.push({ proto: record, key, original });
4449
+ }
4450
+ function isNestedResource(value) {
4451
+ if (value === null || typeof value !== "object") {
4452
+ return false;
4453
+ }
4454
+ const proto = Object.getPrototypeOf(value);
4455
+ return proto !== Object.prototype && proto !== null;
4456
+ }
4457
+ function walkResource(obj, path) {
4458
+ const proto = Object.getPrototypeOf(obj);
4459
+ if (proto && proto !== Object.prototype) {
4460
+ for (const key of Object.getOwnPropertyNames(proto)) {
4461
+ if (key === "constructor") {
4462
+ continue;
4463
+ }
4464
+ const descriptor = Object.getOwnPropertyDescriptor(proto, key);
4465
+ if (descriptor && typeof descriptor.value === "function") {
4466
+ wrapMethod(proto, key, [...path, key].join("."));
4467
+ }
4468
+ }
4469
+ }
4470
+ for (const key of Object.keys(obj)) {
4471
+ const value = obj[key];
4472
+ if (typeof value === "function" || value instanceof Workast) {
4473
+ continue;
4474
+ }
4475
+ if (isNestedResource(value)) {
4476
+ walkResource(value, [...path, key]);
4477
+ }
4478
+ }
4479
+ }
4480
+ function patchPrototypes() {
4481
+ if (patches.length > 0) {
4482
+ return;
4483
+ }
4484
+ const probe = new Workast({
4485
+ apiKey: "test-api-key",
4486
+ fetch: () => Promise.resolve(new Response(null, { status: 204 }))
4487
+ });
4488
+ for (const key of Object.keys(probe)) {
4489
+ const value = probe[key];
4490
+ if (typeof value === "function" || value instanceof Workast) {
4491
+ continue;
4492
+ }
4493
+ if (isNestedResource(value)) {
4494
+ walkResource(value, [key]);
4495
+ }
4496
+ }
4497
+ }
4498
+ function unpatchPrototypes() {
4499
+ for (const { proto, key, original } of patches) {
4500
+ proto[key] = original;
4501
+ }
4502
+ patches.length = 0;
4503
+ }
4504
+ function addInterceptor(session, method, expectedArgs, error, value) {
4505
+ const interceptor = {
4506
+ method,
4507
+ expectedArgs,
4508
+ used: false,
4509
+ error,
4510
+ value,
4511
+ wasCalled() {
4512
+ return interceptor.used;
4513
+ }
4514
+ };
4515
+ session.interceptors.push(interceptor);
4516
+ return interceptor;
4517
+ }
4518
+ function registrar(session, path) {
4519
+ const method = path.join(".");
4520
+ return {
4521
+ on(...expectedArgs) {
4522
+ return {
4523
+ resolves(value) {
4524
+ return addInterceptor(session, method, expectedArgs, void 0, value);
4525
+ },
4526
+ rejects(error) {
4527
+ return addInterceptor(session, method, expectedArgs, error, void 0);
4528
+ }
4529
+ };
4530
+ }
4531
+ };
4532
+ }
4533
+ function resourceTree(session, path) {
4534
+ return new Proxy(registrar(session, path), {
4535
+ get(target, prop) {
4536
+ if (prop === "on") {
4537
+ return target.on;
4538
+ }
4539
+ if (typeof prop !== "string") {
4540
+ return void 0;
4541
+ }
4542
+ return resourceTree(session, [...path, prop]);
4543
+ }
4544
+ });
4545
+ }
4546
+ function mockWorkast() {
4547
+ patchPrototypes();
4548
+ const session = {
4549
+ calls: [],
4550
+ interceptors: []
4551
+ };
4552
+ active = session;
4553
+ const api = {
4554
+ calls() {
4555
+ return session.calls;
4556
+ },
4557
+ pending() {
4558
+ return session.interceptors.filter((interceptor) => !interceptor.used);
4559
+ },
4560
+ reset() {
4561
+ for (const interceptor of session.interceptors) {
4562
+ interceptor.used = false;
4563
+ }
4564
+ session.interceptors.length = 0;
4565
+ session.calls.length = 0;
4566
+ },
4567
+ restore() {
4568
+ api.reset();
4569
+ unpatchPrototypes();
4570
+ active = null;
4571
+ }
4572
+ };
4573
+ return new Proxy(api, {
4574
+ get(target, prop) {
4575
+ if (typeof prop === "string" && ROOT_KEYS.has(prop)) {
4576
+ return target[prop];
4577
+ }
4578
+ if (typeof prop !== "string") {
4579
+ return void 0;
4580
+ }
4581
+ return resourceTree(session, [prop]);
4582
+ }
4583
+ });
4584
+ }
4585
+ // Annotate the CommonJS export names for ESM import in node:
4586
+ 0 && (module.exports = {
4587
+ errors,
4588
+ examples,
4589
+ mockWorkast
4590
+ });
4591
+ //# sourceMappingURL=mock.cjs.map