@archastro/sdk 0.9.0 → 0.11.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/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -1
- package/dist/client.js.map +1 -1
- package/dist/types/ai.d.ts +2 -2
- package/dist/types/chat.d.ts +111 -50
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/common.d.ts +1096 -468
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +155 -62
- package/dist/types/common.js.map +1 -1
- package/dist/types/extractions.d.ts +36 -0
- package/dist/types/extractions.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/status.d.ts +121 -0
- package/dist/types/status.d.ts.map +1 -0
- package/dist/types/status.js +18 -0
- package/dist/types/status.js.map +1 -0
- package/dist/types/tasks.d.ts +601 -0
- package/dist/types/tasks.d.ts.map +1 -0
- package/dist/types/tasks.js +118 -0
- package/dist/types/tasks.js.map +1 -0
- package/dist/types/threads.d.ts +542 -5
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +45 -2
- package/dist/types/threads.js.map +1 -1
- package/dist/v1/resources/activity_feed.d.ts +1 -1
- package/dist/v1/resources/activity_feed.js +2 -2
- package/dist/v1/resources/agents.d.ts +2 -2
- package/dist/v1/resources/agents.js +3 -3
- package/dist/v1/resources/custom_objects.d.ts +86 -20
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +41 -19
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/files.d.ts +19 -0
- package/dist/v1/resources/files.d.ts.map +1 -1
- package/dist/v1/resources/files.js +3 -1
- package/dist/v1/resources/files.js.map +1 -1
- package/dist/v1/resources/index.d.ts +7 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +8 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/private_service_definitions.d.ts +12 -0
- package/dist/v1/resources/private_service_definitions.d.ts.map +1 -0
- package/dist/v1/resources/private_service_definitions.js +18 -0
- package/dist/v1/resources/private_service_definitions.js.map +1 -0
- package/dist/v1/resources/private_service_enrollments.d.ts +42 -0
- package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -0
- package/dist/v1/resources/private_service_enrollments.js +56 -0
- package/dist/v1/resources/private_service_enrollments.js.map +1 -0
- package/dist/v1/resources/private_services.d.ts +46 -0
- package/dist/v1/resources/private_services.d.ts.map +1 -0
- package/dist/v1/resources/private_services.js +55 -0
- package/dist/v1/resources/private_services.js.map +1 -0
- package/dist/v1/resources/sandboxes.d.ts +81 -0
- package/dist/v1/resources/sandboxes.d.ts.map +1 -0
- package/dist/v1/resources/sandboxes.js +84 -0
- package/dist/v1/resources/sandboxes.js.map +1 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts +37 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.js +31 -1
- package/dist/v1/resources/slack_channel_bindings.js.map +1 -1
- package/dist/v1/resources/solutions.d.ts +2 -0
- package/dist/v1/resources/solutions.d.ts.map +1 -1
- package/dist/v1/resources/solutions.js +2 -1
- package/dist/v1/resources/solutions.js.map +1 -1
- package/dist/v1/resources/status.d.ts +22 -0
- package/dist/v1/resources/status.d.ts.map +1 -0
- package/dist/v1/resources/status.js +27 -0
- package/dist/v1/resources/status.js.map +1 -0
- package/dist/v1/resources/tasks.d.ts +599 -0
- package/dist/v1/resources/tasks.d.ts.map +1 -0
- package/dist/v1/resources/tasks.js +436 -0
- package/dist/v1/resources/tasks.js.map +1 -0
- package/dist/v1/resources/teams.d.ts +463 -0
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +281 -1
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +25 -3
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +25 -4
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +40 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +36 -1
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/trajectories.d.ts +34 -0
- package/dist/v1/resources/trajectories.d.ts.map +1 -0
- package/dist/v1/resources/trajectories.js +41 -0
- package/dist/v1/resources/trajectories.js.map +1 -0
- package/dist/v1/resources/users.d.ts +353 -0
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +208 -1
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1.d.ts +14 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +22 -1
- package/dist/v1.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
2
|
import type { CustomObject } from "../../types/common.js";
|
|
3
|
+
import type { Task } from "../../types/tasks.js";
|
|
3
4
|
import type { Team, TeamInvite, TeamMembership } from "../../types/teams.js";
|
|
4
5
|
import type { Thread } from "../../types/threads.js";
|
|
5
6
|
export declare class TeamCustomObjectResource {
|
|
@@ -37,6 +38,22 @@ export declare class TeamCustomObjectResource {
|
|
|
37
38
|
query?: string;
|
|
38
39
|
}): Promise<{
|
|
39
40
|
data: {
|
|
41
|
+
acl?: {
|
|
42
|
+
add?: {
|
|
43
|
+
actions: string[];
|
|
44
|
+
principal?: string | undefined;
|
|
45
|
+
principal_type: string;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
grants?: {
|
|
48
|
+
actions: string[];
|
|
49
|
+
principal?: string | undefined;
|
|
50
|
+
principal_type: string;
|
|
51
|
+
}[] | undefined;
|
|
52
|
+
remove?: {
|
|
53
|
+
principal?: string | undefined;
|
|
54
|
+
principal_type: string;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
} | undefined;
|
|
40
57
|
created_at?: string | undefined;
|
|
41
58
|
fields?: Record<string, unknown> | undefined;
|
|
42
59
|
id: string;
|
|
@@ -356,6 +373,384 @@ export declare class MemberResource {
|
|
|
356
373
|
role: string;
|
|
357
374
|
}): Promise<TeamMembership>;
|
|
358
375
|
}
|
|
376
|
+
export declare class TeamTaskResource {
|
|
377
|
+
private http;
|
|
378
|
+
constructor(http: HttpClient);
|
|
379
|
+
/**
|
|
380
|
+
* List an owner's tasks
|
|
381
|
+
* Returns tasks owned by the specified user or team. You can narrow results using the
|
|
382
|
+
* optional filters below. By default results are returned in reverse chronological
|
|
383
|
+
* order (most recently created first); use `sort` and `order` to sort by due date or
|
|
384
|
+
* priority instead.
|
|
385
|
+
* User-authenticated callers may list their personal tasks or tasks for teams they
|
|
386
|
+
* have joined. Privileged callers provide the owner in the route; the owner's
|
|
387
|
+
* organization is implied by that principal. An explicit `org` is optional and,
|
|
388
|
+
* when set, must match the owner's organization.
|
|
389
|
+
* @param team - Team ID (`tem_...`). Only tasks belonging to this team are returned.
|
|
390
|
+
* @param params - Query parameters.
|
|
391
|
+
* @param params.user - User ID (`usr_...`) for user-scoped tasks.
|
|
392
|
+
* @param params.org - Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
|
|
393
|
+
* @param params.status - Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
|
|
394
|
+
* @param params.ownerUser - Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
|
|
395
|
+
* @param params.ownerAgent - Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
|
|
396
|
+
* @param params.priority - Filter tasks by priority, from 0 (highest) to 4 (lowest).
|
|
397
|
+
* @param params.tag - Return only tasks carrying this tag (matched against the canonical lowercase form).
|
|
398
|
+
* @param params.parent - Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
|
|
399
|
+
* @param params.search - Restrict results to tasks whose name or description contains this string.
|
|
400
|
+
* @param params.sort - Sort key. One of `"created"` (default — most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
|
|
401
|
+
* @param params.order - Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
|
|
402
|
+
* @param params.dueBefore - Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
|
|
403
|
+
* @param params.dueAfter - Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
|
|
404
|
+
* @param params.overdue - When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
|
|
405
|
+
* @param params.limit - Maximum number of tasks to return. Capped at 100.
|
|
406
|
+
* @param params.afterCursor - Opaque cursor returned by the previous page.
|
|
407
|
+
* @returns Successful response
|
|
408
|
+
*/
|
|
409
|
+
list(team: string, params?: {
|
|
410
|
+
user?: string;
|
|
411
|
+
org?: string;
|
|
412
|
+
status?: string;
|
|
413
|
+
ownerUser?: string;
|
|
414
|
+
ownerAgent?: string;
|
|
415
|
+
priority?: number;
|
|
416
|
+
tag?: string;
|
|
417
|
+
parent?: string;
|
|
418
|
+
search?: string;
|
|
419
|
+
sort?: string;
|
|
420
|
+
order?: string;
|
|
421
|
+
dueBefore?: string;
|
|
422
|
+
dueAfter?: string;
|
|
423
|
+
overdue?: boolean;
|
|
424
|
+
limit?: number;
|
|
425
|
+
afterCursor?: string;
|
|
426
|
+
}): Promise<{
|
|
427
|
+
after_cursor?: string | undefined;
|
|
428
|
+
before_cursor?: string | undefined;
|
|
429
|
+
data: {
|
|
430
|
+
agent?: string | undefined;
|
|
431
|
+
blocked_by_count?: number | undefined;
|
|
432
|
+
closed_at?: string | undefined;
|
|
433
|
+
comments_count?: number | undefined;
|
|
434
|
+
created_at?: string | undefined;
|
|
435
|
+
created_by_actor?: {
|
|
436
|
+
alias?: string | undefined;
|
|
437
|
+
id?: string | undefined;
|
|
438
|
+
name?: string | undefined;
|
|
439
|
+
profile_picture?: {
|
|
440
|
+
file?: string | undefined;
|
|
441
|
+
height?: number | undefined;
|
|
442
|
+
media?: string | undefined;
|
|
443
|
+
mime_type?: string | undefined;
|
|
444
|
+
refresh_url?: string | undefined;
|
|
445
|
+
url?: string | undefined;
|
|
446
|
+
width?: number | undefined;
|
|
447
|
+
} | undefined;
|
|
448
|
+
} | undefined;
|
|
449
|
+
created_by_agent?: string | undefined;
|
|
450
|
+
created_by_user?: string | undefined;
|
|
451
|
+
current_lease?: {
|
|
452
|
+
expires_at: string;
|
|
453
|
+
harness: string;
|
|
454
|
+
session_name: string;
|
|
455
|
+
} | null | undefined;
|
|
456
|
+
description?: string | undefined;
|
|
457
|
+
due_date?: string | undefined;
|
|
458
|
+
id: string;
|
|
459
|
+
is_blocked?: boolean | undefined;
|
|
460
|
+
links?: Record<string, unknown> | undefined;
|
|
461
|
+
metadata?: Record<string, unknown> | undefined;
|
|
462
|
+
name: string;
|
|
463
|
+
org?: string | undefined;
|
|
464
|
+
owner_actor?: {
|
|
465
|
+
alias?: string | undefined;
|
|
466
|
+
id?: string | undefined;
|
|
467
|
+
name?: string | undefined;
|
|
468
|
+
profile_picture?: {
|
|
469
|
+
file?: string | undefined;
|
|
470
|
+
height?: number | undefined;
|
|
471
|
+
media?: string | undefined;
|
|
472
|
+
mime_type?: string | undefined;
|
|
473
|
+
refresh_url?: string | undefined;
|
|
474
|
+
url?: string | undefined;
|
|
475
|
+
width?: number | undefined;
|
|
476
|
+
} | undefined;
|
|
477
|
+
} | undefined;
|
|
478
|
+
owner_agent?: string | undefined;
|
|
479
|
+
owner_user?: string | undefined;
|
|
480
|
+
parent?: string | undefined;
|
|
481
|
+
priority?: number | undefined;
|
|
482
|
+
sandbox?: string | undefined;
|
|
483
|
+
status: string;
|
|
484
|
+
subtasks_count?: number | undefined;
|
|
485
|
+
tags?: string[] | undefined;
|
|
486
|
+
team?: string | undefined;
|
|
487
|
+
thread?: string | undefined;
|
|
488
|
+
updated_at?: string | undefined;
|
|
489
|
+
user?: string | undefined;
|
|
490
|
+
}[];
|
|
491
|
+
has_more: boolean;
|
|
492
|
+
}>;
|
|
493
|
+
/**
|
|
494
|
+
* Create a task for an owner
|
|
495
|
+
* Creates a new task owned by the specified user or team and returns the full
|
|
496
|
+
* task object. User-authenticated calls are attributed to the authenticated
|
|
497
|
+
* user or agent. App-scoped developer and server-to-server callers must provide
|
|
498
|
+
* the task's explicit `org` scope and an explicit `user` or `agent` actor for
|
|
499
|
+
* team tasks; a user-owned task reuses the user in the route unless an explicit
|
|
500
|
+
* agent is supplied. Every referenced principal is validated against the app,
|
|
501
|
+
* owner, and team membership before creation.
|
|
502
|
+
* @param team - Team ID (`tem_...`). Only tasks belonging to this team are returned.
|
|
503
|
+
* @param input - Request body.
|
|
504
|
+
* @param input.agent - Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
|
|
505
|
+
* @param input.org - Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
|
|
506
|
+
* @param input.task - Attributes for the task to create. `name` is required; all other fields are optional.
|
|
507
|
+
* @param input.user - User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
|
|
508
|
+
* @returns The newly created task.
|
|
509
|
+
*/
|
|
510
|
+
create(team: string, input: {
|
|
511
|
+
agent?: string | undefined;
|
|
512
|
+
org?: string | undefined;
|
|
513
|
+
task: {
|
|
514
|
+
description?: string | undefined;
|
|
515
|
+
due_date?: string | undefined;
|
|
516
|
+
links?: Record<string, unknown> | undefined;
|
|
517
|
+
metadata?: Record<string, unknown> | undefined;
|
|
518
|
+
name: string;
|
|
519
|
+
owner_agent?: string | undefined;
|
|
520
|
+
owner_user?: string | undefined;
|
|
521
|
+
parent?: string | undefined;
|
|
522
|
+
priority?: number | undefined;
|
|
523
|
+
status?: string | undefined;
|
|
524
|
+
tags?: string[] | undefined;
|
|
525
|
+
thread?: string | undefined;
|
|
526
|
+
};
|
|
527
|
+
user?: string | undefined;
|
|
528
|
+
}): Promise<Task>;
|
|
529
|
+
/**
|
|
530
|
+
* List task blocker cycles
|
|
531
|
+
* Runs an on-demand diagnostic over unfinished tasks owned by the specified
|
|
532
|
+
* team or user and returns a forward cursor-paginated page of complete cyclic
|
|
533
|
+
* blocker components. Detection is bounded to owners with at most 100
|
|
534
|
+
* unfinished tasks. This endpoint is read-only: cycles do not prevent task
|
|
535
|
+
* updates, lease acquisition, or completion.
|
|
536
|
+
* @param team - Team ID (`tem_...`). Only tasks belonging to this team are returned.
|
|
537
|
+
* @param params - Query parameters.
|
|
538
|
+
* @param params.user - User ID (`usr_...`) owning the tasks.
|
|
539
|
+
* @param params.org - Optional organization context for privileged callers.
|
|
540
|
+
* @param params.limit - Maximum cycle components to return. Defaults to 50; maximum is 100.
|
|
541
|
+
* @param params.afterCursor - Opaque cursor returned by the preceding page.
|
|
542
|
+
* @returns Successful response
|
|
543
|
+
*/
|
|
544
|
+
blockerCycles(team: string, params?: {
|
|
545
|
+
user?: string;
|
|
546
|
+
org?: string;
|
|
547
|
+
limit?: number;
|
|
548
|
+
afterCursor?: string;
|
|
549
|
+
}): Promise<{
|
|
550
|
+
after_cursor?: string | undefined;
|
|
551
|
+
before_cursor?: string | undefined;
|
|
552
|
+
data: {
|
|
553
|
+
tasks: {
|
|
554
|
+
agent?: string | undefined;
|
|
555
|
+
blocked_by_count?: number | undefined;
|
|
556
|
+
closed_at?: string | undefined;
|
|
557
|
+
comments_count?: number | undefined;
|
|
558
|
+
created_at?: string | undefined;
|
|
559
|
+
created_by_actor?: {
|
|
560
|
+
alias?: string | undefined;
|
|
561
|
+
id?: string | undefined;
|
|
562
|
+
name?: string | undefined;
|
|
563
|
+
profile_picture?: {
|
|
564
|
+
file?: string | undefined;
|
|
565
|
+
height?: number | undefined;
|
|
566
|
+
media?: string | undefined;
|
|
567
|
+
mime_type?: string | undefined;
|
|
568
|
+
refresh_url?: string | undefined;
|
|
569
|
+
url?: string | undefined;
|
|
570
|
+
width?: number | undefined;
|
|
571
|
+
} | undefined;
|
|
572
|
+
} | undefined;
|
|
573
|
+
created_by_agent?: string | undefined;
|
|
574
|
+
created_by_user?: string | undefined;
|
|
575
|
+
current_lease?: {
|
|
576
|
+
expires_at: string;
|
|
577
|
+
harness: string;
|
|
578
|
+
session_name: string;
|
|
579
|
+
} | null | undefined;
|
|
580
|
+
description?: string | undefined;
|
|
581
|
+
due_date?: string | undefined;
|
|
582
|
+
id: string;
|
|
583
|
+
is_blocked?: boolean | undefined;
|
|
584
|
+
links?: Record<string, unknown> | undefined;
|
|
585
|
+
metadata?: Record<string, unknown> | undefined;
|
|
586
|
+
name: string;
|
|
587
|
+
org?: string | undefined;
|
|
588
|
+
owner_actor?: {
|
|
589
|
+
alias?: string | undefined;
|
|
590
|
+
id?: string | undefined;
|
|
591
|
+
name?: string | undefined;
|
|
592
|
+
profile_picture?: {
|
|
593
|
+
file?: string | undefined;
|
|
594
|
+
height?: number | undefined;
|
|
595
|
+
media?: string | undefined;
|
|
596
|
+
mime_type?: string | undefined;
|
|
597
|
+
refresh_url?: string | undefined;
|
|
598
|
+
url?: string | undefined;
|
|
599
|
+
width?: number | undefined;
|
|
600
|
+
} | undefined;
|
|
601
|
+
} | undefined;
|
|
602
|
+
owner_agent?: string | undefined;
|
|
603
|
+
owner_user?: string | undefined;
|
|
604
|
+
parent?: string | undefined;
|
|
605
|
+
priority?: number | undefined;
|
|
606
|
+
sandbox?: string | undefined;
|
|
607
|
+
status: string;
|
|
608
|
+
subtasks_count?: number | undefined;
|
|
609
|
+
tags?: string[] | undefined;
|
|
610
|
+
team?: string | undefined;
|
|
611
|
+
thread?: string | undefined;
|
|
612
|
+
updated_at?: string | undefined;
|
|
613
|
+
user?: string | undefined;
|
|
614
|
+
}[];
|
|
615
|
+
}[];
|
|
616
|
+
has_more: boolean;
|
|
617
|
+
}>;
|
|
618
|
+
/**
|
|
619
|
+
* Get task activity metrics for a team
|
|
620
|
+
* Returns task activity metrics scoped to one team (the Network in ArchAgents).
|
|
621
|
+
* `open` counts currently open or in-progress team tasks, `created` counts
|
|
622
|
+
* tasks inserted in the UTC-day window, and `completed` counts tasks whose
|
|
623
|
+
* `closed_at` falls in that window while still in a closed status. Hard-deleted
|
|
624
|
+
* tasks are absent from the projection and therefore omitted. The daily series
|
|
625
|
+
* is zero-filled across the requested window and includes reconstructed
|
|
626
|
+
* end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
|
|
627
|
+
* Any authenticated team member may read this count-only Network summary.
|
|
628
|
+
* Requests from callers without team access return 404 so team existence is
|
|
629
|
+
* not disclosed.
|
|
630
|
+
* @param team - Team ID (`tem_...`). Only tasks belonging to this team are returned.
|
|
631
|
+
* @param params - Query parameters.
|
|
632
|
+
* @param params.days - UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
|
|
633
|
+
* @returns Successful response
|
|
634
|
+
*/
|
|
635
|
+
metrics(team: string, params?: {
|
|
636
|
+
days?: number;
|
|
637
|
+
}): Promise<{
|
|
638
|
+
completed: number;
|
|
639
|
+
created: number;
|
|
640
|
+
days: number;
|
|
641
|
+
end_at: string;
|
|
642
|
+
open: number;
|
|
643
|
+
series: Record<string, unknown>[];
|
|
644
|
+
start_at: string;
|
|
645
|
+
}>;
|
|
646
|
+
/**
|
|
647
|
+
* Search an owner's tasks
|
|
648
|
+
* Performs a full-text search over tasks owned by the specified user or team and returns
|
|
649
|
+
* matching results. Combine `q` with the optional filters to narrow the result set
|
|
650
|
+
* further. When no query is provided, the endpoint behaves like a filtered list.
|
|
651
|
+
* The `query` field in the response echoes the effective search query.
|
|
652
|
+
* User-authenticated callers may search their personal tasks or tasks for teams
|
|
653
|
+
* they have joined. Privileged callers provide the owner in the route; the owner's
|
|
654
|
+
* organization is implied by that principal. An explicit `org` is optional and,
|
|
655
|
+
* when set, must match the owner's organization.
|
|
656
|
+
* @param team - Team ID (`tem_...`). Only tasks belonging to this team are returned.
|
|
657
|
+
* @param params - Query parameters.
|
|
658
|
+
* @param params.user - User ID (`usr_...`) whose tasks are searched.
|
|
659
|
+
* @param params.org - Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
|
|
660
|
+
* @param params.q - Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
|
|
661
|
+
* @param params.query - Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
|
|
662
|
+
* @param params.status - Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
|
|
663
|
+
* @param params.ownerUser - Restrict results to tasks assigned to the user with this public ID (`usr_...`).
|
|
664
|
+
* @param params.ownerAgent - Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
|
|
665
|
+
* @param params.priority - Filter results by priority, from 0 (highest) to 4 (lowest).
|
|
666
|
+
* @param params.tag - Return only tasks carrying this tag (matched against the canonical lowercase form).
|
|
667
|
+
* @param params.parent - Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
|
|
668
|
+
* @param params.limit - Maximum number of tasks to return. Capped at 100.
|
|
669
|
+
* @param params.afterCursor - Opaque cursor returned by the previous page.
|
|
670
|
+
* @returns Successful response
|
|
671
|
+
*/
|
|
672
|
+
search(team: string, params?: {
|
|
673
|
+
user?: string;
|
|
674
|
+
org?: string;
|
|
675
|
+
q?: string;
|
|
676
|
+
query?: string;
|
|
677
|
+
status?: string;
|
|
678
|
+
ownerUser?: string;
|
|
679
|
+
ownerAgent?: string;
|
|
680
|
+
priority?: number;
|
|
681
|
+
tag?: string;
|
|
682
|
+
parent?: string;
|
|
683
|
+
limit?: number;
|
|
684
|
+
afterCursor?: string;
|
|
685
|
+
}): Promise<{
|
|
686
|
+
after_cursor?: string | undefined;
|
|
687
|
+
before_cursor?: string | undefined;
|
|
688
|
+
data: {
|
|
689
|
+
agent?: string | undefined;
|
|
690
|
+
blocked_by_count?: number | undefined;
|
|
691
|
+
closed_at?: string | undefined;
|
|
692
|
+
comments_count?: number | undefined;
|
|
693
|
+
created_at?: string | undefined;
|
|
694
|
+
created_by_actor?: {
|
|
695
|
+
alias?: string | undefined;
|
|
696
|
+
id?: string | undefined;
|
|
697
|
+
name?: string | undefined;
|
|
698
|
+
profile_picture?: {
|
|
699
|
+
file?: string | undefined;
|
|
700
|
+
height?: number | undefined;
|
|
701
|
+
media?: string | undefined;
|
|
702
|
+
mime_type?: string | undefined;
|
|
703
|
+
refresh_url?: string | undefined;
|
|
704
|
+
url?: string | undefined;
|
|
705
|
+
width?: number | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
} | undefined;
|
|
708
|
+
created_by_agent?: string | undefined;
|
|
709
|
+
created_by_user?: string | undefined;
|
|
710
|
+
current_lease?: {
|
|
711
|
+
expires_at: string;
|
|
712
|
+
harness: string;
|
|
713
|
+
session_name: string;
|
|
714
|
+
} | null | undefined;
|
|
715
|
+
description?: string | undefined;
|
|
716
|
+
due_date?: string | undefined;
|
|
717
|
+
id: string;
|
|
718
|
+
is_blocked?: boolean | undefined;
|
|
719
|
+
links?: Record<string, unknown> | undefined;
|
|
720
|
+
metadata?: Record<string, unknown> | undefined;
|
|
721
|
+
name: string;
|
|
722
|
+
org?: string | undefined;
|
|
723
|
+
owner_actor?: {
|
|
724
|
+
alias?: string | undefined;
|
|
725
|
+
id?: string | undefined;
|
|
726
|
+
name?: string | undefined;
|
|
727
|
+
profile_picture?: {
|
|
728
|
+
file?: string | undefined;
|
|
729
|
+
height?: number | undefined;
|
|
730
|
+
media?: string | undefined;
|
|
731
|
+
mime_type?: string | undefined;
|
|
732
|
+
refresh_url?: string | undefined;
|
|
733
|
+
url?: string | undefined;
|
|
734
|
+
width?: number | undefined;
|
|
735
|
+
} | undefined;
|
|
736
|
+
} | undefined;
|
|
737
|
+
owner_agent?: string | undefined;
|
|
738
|
+
owner_user?: string | undefined;
|
|
739
|
+
parent?: string | undefined;
|
|
740
|
+
priority?: number | undefined;
|
|
741
|
+
sandbox?: string | undefined;
|
|
742
|
+
status: string;
|
|
743
|
+
subtasks_count?: number | undefined;
|
|
744
|
+
tags?: string[] | undefined;
|
|
745
|
+
team?: string | undefined;
|
|
746
|
+
thread?: string | undefined;
|
|
747
|
+
updated_at?: string | undefined;
|
|
748
|
+
user?: string | undefined;
|
|
749
|
+
}[];
|
|
750
|
+
has_more: boolean;
|
|
751
|
+
query: string;
|
|
752
|
+
}>;
|
|
753
|
+
}
|
|
359
754
|
export declare class TeamThreadResource {
|
|
360
755
|
private http;
|
|
361
756
|
constructor(http: HttpClient);
|
|
@@ -512,6 +907,7 @@ export declare class TeamThreadResource {
|
|
|
512
907
|
replies_before_cursor?: string | undefined;
|
|
513
908
|
reply_count?: number | undefined;
|
|
514
909
|
reply_to?: Record<string, unknown> | undefined;
|
|
910
|
+
root_message_id?: string | null | undefined;
|
|
515
911
|
sandbox?: string | undefined;
|
|
516
912
|
team?: string | undefined;
|
|
517
913
|
thread?: string | undefined;
|
|
@@ -774,11 +1170,38 @@ export declare class TeamThreadResource {
|
|
|
774
1170
|
visibility?: "team" | "restricted" | "private" | undefined;
|
|
775
1171
|
};
|
|
776
1172
|
}): Promise<Thread>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Get threads-created count for a team
|
|
1175
|
+
* Returns how many **network-public** team threads were created in the UTC-day
|
|
1176
|
+
* window. Counts come from realtime SQL aggregation over append-only
|
|
1177
|
+
* `network_activity_events` (`thread.created` rows co-committed with create):
|
|
1178
|
+
* team- or restricted-visibility threads (plus legacy open-team rows), never
|
|
1179
|
+
* private or mirror. Every Network member sees the same number. Hard-delete
|
|
1180
|
+
* co-commits a separate `thread.deleted` transition event and does not remove
|
|
1181
|
+
* create events (metric is "created", not "still present"). Visibility flips
|
|
1182
|
+
* after insert are ignored in v1.
|
|
1183
|
+
* Any authenticated team member may read this count-only Network summary.
|
|
1184
|
+
* Requests from callers without team access return 404 so team existence is
|
|
1185
|
+
* not disclosed.
|
|
1186
|
+
* @param team - Team ID (`tem_...`) whose threads should be listed.
|
|
1187
|
+
* @param params - Query parameters.
|
|
1188
|
+
* @param params.days - UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
|
|
1189
|
+
* @returns Successful response
|
|
1190
|
+
*/
|
|
1191
|
+
metrics(team: string, params?: {
|
|
1192
|
+
days?: number;
|
|
1193
|
+
}): Promise<{
|
|
1194
|
+
days: number;
|
|
1195
|
+
end_at: string;
|
|
1196
|
+
opened: number;
|
|
1197
|
+
start_at: string;
|
|
1198
|
+
}>;
|
|
777
1199
|
}
|
|
778
1200
|
export declare class TeamResource {
|
|
779
1201
|
private http;
|
|
780
1202
|
readonly custom_objects: TeamCustomObjectResource;
|
|
781
1203
|
readonly members: MemberResource;
|
|
1204
|
+
readonly tasks: TeamTaskResource;
|
|
782
1205
|
readonly threads: TeamThreadResource;
|
|
783
1206
|
constructor(http: HttpClient);
|
|
784
1207
|
/**
|
|
@@ -861,6 +1284,7 @@ export declare class TeamResource {
|
|
|
861
1284
|
* @param input - Request body.
|
|
862
1285
|
* @param input.acl - Access control configuration for the team. Controls who can discover and join the team.
|
|
863
1286
|
* @param input.description - Optional human-readable description of the team's purpose.
|
|
1287
|
+
* @param input.idempotency_key - Optional retry key. Replays in the same app, organization, and sandbox return the original team.
|
|
864
1288
|
* @param input.metadata - Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
|
|
865
1289
|
* @param input.name - Display name for the team.
|
|
866
1290
|
* @param input.org - Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
|
|
@@ -884,6 +1308,7 @@ export declare class TeamResource {
|
|
|
884
1308
|
}[] | undefined;
|
|
885
1309
|
} | undefined;
|
|
886
1310
|
description?: string | undefined;
|
|
1311
|
+
idempotency_key?: string | undefined;
|
|
887
1312
|
metadata?: Record<string, unknown> | undefined;
|
|
888
1313
|
name: string;
|
|
889
1314
|
org?: string | undefined;
|
|
@@ -1084,5 +1509,43 @@ export declare class TeamResource {
|
|
|
1084
1509
|
* @returns Empty response — the principal has been removed from the team.
|
|
1085
1510
|
*/
|
|
1086
1511
|
leave(team: string): Promise<void>;
|
|
1512
|
+
/**
|
|
1513
|
+
* List task assignees for a team
|
|
1514
|
+
* Returns the list of principals — users and agents — that can be assigned
|
|
1515
|
+
* to tasks within the team. Results include both human members and AI agents
|
|
1516
|
+
* and are sorted alphabetically by display name.
|
|
1517
|
+
* This endpoint is only available for team-scoped contexts. Calling it with a
|
|
1518
|
+
* user-scoped owner returns a 400 error. The authenticated user must be a
|
|
1519
|
+
* member of the team or hold org-admin access. App-scoped developer and
|
|
1520
|
+
* server-to-server callers may list assignees for teams in their app so they
|
|
1521
|
+
* can select the explicit user or agent actor required by privileged task
|
|
1522
|
+
* mutations.
|
|
1523
|
+
* @param team - Team ID (`tem_...`).
|
|
1524
|
+
* @param params - Query parameters.
|
|
1525
|
+
* @param params.org - Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
|
|
1526
|
+
* @returns Successful response
|
|
1527
|
+
*/
|
|
1528
|
+
taskAssignees(team: string, params?: {
|
|
1529
|
+
org?: string;
|
|
1530
|
+
}): Promise<{
|
|
1531
|
+
data: {
|
|
1532
|
+
actor: {
|
|
1533
|
+
alias?: string | undefined;
|
|
1534
|
+
id?: string | undefined;
|
|
1535
|
+
name?: string | undefined;
|
|
1536
|
+
profile_picture?: {
|
|
1537
|
+
file?: string | undefined;
|
|
1538
|
+
height?: number | undefined;
|
|
1539
|
+
media?: string | undefined;
|
|
1540
|
+
mime_type?: string | undefined;
|
|
1541
|
+
refresh_url?: string | undefined;
|
|
1542
|
+
url?: string | undefined;
|
|
1543
|
+
width?: number | undefined;
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
};
|
|
1546
|
+
id: string;
|
|
1547
|
+
type: "user" | "agent";
|
|
1548
|
+
}[];
|
|
1549
|
+
}>;
|
|
1087
1550
|
}
|
|
1088
1551
|
//# sourceMappingURL=teams.d.ts.map
|