@parall/sdk 1.54.0 → 1.55.1
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 +104 -74
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +173 -124
- package/dist/constants.d.ts +25 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +35 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/project-task-client.d.ts +101 -0
- package/dist/project-task-client.d.ts.map +1 -0
- package/dist/project-task-client.js +173 -0
- package/dist/subject.d.ts +22 -0
- package/dist/subject.d.ts.map +1 -0
- package/dist/subject.js +45 -0
- package/dist/task-label-client.d.ts +13 -0
- package/dist/task-label-client.d.ts.map +1 -0
- package/dist/task-label-client.js +24 -0
- package/dist/task-label-types.d.ts +33 -0
- package/dist/task-label-types.d.ts.map +1 -0
- package/dist/task-label-types.js +1 -0
- package/dist/types.d.ts +388 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -3
- package/package.json +1 -1
- package/src/client.ts +471 -460
- package/src/constants.ts +48 -5
- package/src/index.ts +2 -0
- package/src/project-task-client.ts +342 -0
- package/src/subject.ts +57 -0
- package/src/task-label-client.ts +37 -0
- package/src/task-label-types.ts +51 -0
- package/src/types.ts +433 -26
package/src/types.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Label,
|
|
3
|
+
LabelCreatedData,
|
|
4
|
+
LabelDeletedData,
|
|
5
|
+
LabelUpdatedData,
|
|
6
|
+
} from './task-label-types.js';
|
|
7
|
+
|
|
1
8
|
// ============================================================
|
|
2
9
|
// Entity Types — mirror server data model
|
|
3
10
|
// ============================================================
|
|
@@ -94,6 +101,8 @@ export interface ChatMember {
|
|
|
94
101
|
pinned: boolean;
|
|
95
102
|
hidden: boolean;
|
|
96
103
|
joined_at: string;
|
|
104
|
+
/** Org-scoped public title. Omitted by older servers and for former DM peers. */
|
|
105
|
+
title?: string;
|
|
97
106
|
user?: User;
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -477,17 +486,64 @@ export interface UpdateAgentInstructionsRequest {
|
|
|
477
486
|
expected_version: number;
|
|
478
487
|
}
|
|
479
488
|
|
|
480
|
-
// Team — a named group of org members, referenced in
|
|
489
|
+
// Team — a named group of org members, referenced in ACL rosters by its ID.
|
|
490
|
+
export type TeamRole = 'member' | 'manager';
|
|
491
|
+
|
|
481
492
|
export interface Team {
|
|
482
493
|
id: string;
|
|
483
494
|
org_id: string;
|
|
484
495
|
name: string;
|
|
485
|
-
slug
|
|
496
|
+
/** @deprecated Removed since migration 176 — teams have no slug anymore. */
|
|
497
|
+
slug?: string;
|
|
486
498
|
created_by: string;
|
|
487
499
|
created_at: string;
|
|
488
500
|
updated_at: string;
|
|
489
501
|
}
|
|
490
502
|
|
|
503
|
+
/**
|
|
504
|
+
* Display fields a roster listing carries for each member. The server projects
|
|
505
|
+
* only these columns, so this is deliberately narrower than `User`: no email,
|
|
506
|
+
* phone, or last_seen_at reaches a roster response.
|
|
507
|
+
*
|
|
508
|
+
* `avatar_url` is optional rather than nullable because the server omits the
|
|
509
|
+
* field when unset.
|
|
510
|
+
*/
|
|
511
|
+
export interface RosterUser {
|
|
512
|
+
id: string;
|
|
513
|
+
type: UserType;
|
|
514
|
+
display_name: string;
|
|
515
|
+
avatar_url?: string;
|
|
516
|
+
status: UserStatus;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface TeamMember {
|
|
520
|
+
team_id: string;
|
|
521
|
+
user_id: string;
|
|
522
|
+
role: TeamRole;
|
|
523
|
+
added_by: string;
|
|
524
|
+
added_at: string;
|
|
525
|
+
user?: RosterUser;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface CreateTeamRequest {
|
|
529
|
+
name: string;
|
|
530
|
+
/** @deprecated Accepted and ignored by the server since migration 176. */
|
|
531
|
+
slug?: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface UpdateTeamRequest {
|
|
535
|
+
name: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface AddTeamMemberRequest {
|
|
539
|
+
user_id: string;
|
|
540
|
+
role?: TeamRole;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface UpdateTeamMemberRequest {
|
|
544
|
+
role: TeamRole;
|
|
545
|
+
}
|
|
546
|
+
|
|
491
547
|
// Invitation
|
|
492
548
|
|
|
493
549
|
export type InvitationStatus = 'pending' | 'accepted' | 'declined' | 'revoked';
|
|
@@ -751,8 +807,23 @@ export interface DeployTemplateRequest {
|
|
|
751
807
|
/** Hire-time per-agent adjustments (onboarding wizard S2). Keys are the
|
|
752
808
|
* template's agent keys; omitted agents keep template defaults. */
|
|
753
809
|
agent_overrides?: Record<string, DeployAgentOverride>;
|
|
810
|
+
/** Explicit onboarding S4 intent. Each ref must be an effective dependency
|
|
811
|
+
* of this team whose selected_agents restriction was established in S3.
|
|
812
|
+
* Deploy additively grants only the newly-created Agents that declare it. */
|
|
813
|
+
dependency_access_refs?: string[];
|
|
754
814
|
}
|
|
755
815
|
|
|
816
|
+
export interface TemplateDeploymentStatus {
|
|
817
|
+
deployment_id: string;
|
|
818
|
+
status: 'queued' | 'deploying' | 'failed';
|
|
819
|
+
error?: {
|
|
820
|
+
code: string;
|
|
821
|
+
message: string;
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export type TemplateDeploymentResult = TemplateDeploymentReport | TemplateDeploymentStatus;
|
|
826
|
+
|
|
756
827
|
/** Per-agent hire-time override. Substitutes values within the platform-legal
|
|
757
828
|
* surface; never adds capability. Dependencies may only disable (false)
|
|
758
829
|
* declared optional deps — required deps and undeclared refs are rejected. */
|
|
@@ -957,12 +1028,6 @@ export interface DirectMessageResponse {
|
|
|
957
1028
|
message: Message;
|
|
958
1029
|
}
|
|
959
1030
|
|
|
960
|
-
export interface JsonPatchOp {
|
|
961
|
-
op: 'replace' | 'add';
|
|
962
|
-
path: string;
|
|
963
|
-
value: unknown;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
1031
|
export interface CreateAgentRequest {
|
|
967
1032
|
display_name: string;
|
|
968
1033
|
agent_provider?: string;
|
|
@@ -1488,7 +1553,8 @@ export interface Task {
|
|
|
1488
1553
|
assignee_id: string | null;
|
|
1489
1554
|
creator_id: string;
|
|
1490
1555
|
parent_id: string | null;
|
|
1491
|
-
|
|
1556
|
+
/** Every Task belongs to exactly one Project; immutable after creation. */
|
|
1557
|
+
project_id: string;
|
|
1492
1558
|
seq_number: number | null;
|
|
1493
1559
|
identifier: string | null;
|
|
1494
1560
|
sort_order: number;
|
|
@@ -1512,11 +1578,16 @@ export interface Task {
|
|
|
1512
1578
|
deleted_at?: string | null;
|
|
1513
1579
|
/**
|
|
1514
1580
|
* Per-viewer: whether the requesting user may manage OTHER members' comment
|
|
1515
|
-
* subscriptions for this task (creator / assignee / project
|
|
1581
|
+
* subscriptions for this task (creator / assignee / project manager / org
|
|
1516
1582
|
* owner-admin). Populated on single-task GET; undefined elsewhere. Read this to
|
|
1517
1583
|
* gate subscriber-management UI — do not re-derive the rule client-side.
|
|
1518
1584
|
*/
|
|
1519
1585
|
can_manage_subscribers?: boolean;
|
|
1586
|
+
/**
|
|
1587
|
+
* Always present on label-aware HTTP/WS responses. Optional here only so
|
|
1588
|
+
* persisted Task rows from older clients can be read during migration.
|
|
1589
|
+
*/
|
|
1590
|
+
labels?: Label[];
|
|
1520
1591
|
}
|
|
1521
1592
|
|
|
1522
1593
|
export interface TaskWatcher {
|
|
@@ -1583,13 +1654,20 @@ export interface CreateTaskRequest {
|
|
|
1583
1654
|
priority?: TaskPriority;
|
|
1584
1655
|
assignee_id?: string;
|
|
1585
1656
|
parent_id?: string;
|
|
1586
|
-
|
|
1657
|
+
/**
|
|
1658
|
+
* Required: every Task is created inside a Project (missing → 400
|
|
1659
|
+
* MISSING_FIELDS with `error.details.available_projects`; archived project →
|
|
1660
|
+
* 400 PROJECT_ARCHIVED). A parent task's subtasks must use the parent's
|
|
1661
|
+
* project (400 INVALID_PARENT otherwise). Immutable after creation.
|
|
1662
|
+
*/
|
|
1663
|
+
project_id: string;
|
|
1587
1664
|
source_chat_id?: string;
|
|
1588
1665
|
sort_order?: number;
|
|
1589
1666
|
/** Planned start date, YYYY-MM-DD. Must be <= due_date when both are set. */
|
|
1590
1667
|
planned_start_date?: string;
|
|
1591
1668
|
/** Planned completion date, YYYY-MM-DD. */
|
|
1592
1669
|
due_date?: string;
|
|
1670
|
+
label_ids?: string[];
|
|
1593
1671
|
}
|
|
1594
1672
|
|
|
1595
1673
|
export interface UpdateTaskRequest {
|
|
@@ -1599,7 +1677,9 @@ export interface UpdateTaskRequest {
|
|
|
1599
1677
|
priority?: TaskPriority;
|
|
1600
1678
|
assignee_id?: string | null;
|
|
1601
1679
|
parent_id?: string | null;
|
|
1602
|
-
project_id
|
|
1680
|
+
// project_id is deliberately absent: a Task's Project is immutable after
|
|
1681
|
+
// creation (server answers 400 PROJECT_IMMUTABLE; resubmitting the current
|
|
1682
|
+
// value is an idempotent no-op).
|
|
1603
1683
|
sort_order?: number;
|
|
1604
1684
|
/**
|
|
1605
1685
|
* Ordering intent resolved server-side in the update transaction:
|
|
@@ -1616,6 +1696,11 @@ export interface UpdateTaskRequest {
|
|
|
1616
1696
|
planned_start_date?: string | null;
|
|
1617
1697
|
/** Planned completion date, YYYY-MM-DD; explicit null clears it. */
|
|
1618
1698
|
due_date?: string | null;
|
|
1699
|
+
/**
|
|
1700
|
+
* Full-set replacement: absent leaves labels unchanged; [] or null clears.
|
|
1701
|
+
* Concurrent writers should prefer addTaskLabels/removeTaskLabel.
|
|
1702
|
+
*/
|
|
1703
|
+
label_ids?: string[] | null;
|
|
1619
1704
|
/**
|
|
1620
1705
|
* Dispatch lane binding (agent senders during a typed dispatch turn).
|
|
1621
1706
|
* dispatch_lane + dispatch_event_id bind the update to the claimed typed
|
|
@@ -1641,36 +1726,157 @@ export interface CreateTaskRelationRequest {
|
|
|
1641
1726
|
|
|
1642
1727
|
export type ProjectStatus = 'active' | 'paused' | 'completed' | 'archived';
|
|
1643
1728
|
|
|
1729
|
+
/** Visibility only decides how someone becomes a member (self-join /
|
|
1730
|
+
* request+approval / invite-only); membership rights are identical on every
|
|
1731
|
+
* tier, and reads are always roster-scoped. */
|
|
1732
|
+
export type ProjectVisibility = 'public' | 'restricted' | 'private';
|
|
1733
|
+
|
|
1734
|
+
/** A role held on a project roster. Managers administer the project; members
|
|
1735
|
+
* only reach it. Org owners and admins are implicit managers everywhere, which
|
|
1736
|
+
* is why a project can never become unmanageable. */
|
|
1737
|
+
export type ProjectRole = 'member' | 'manager';
|
|
1738
|
+
|
|
1644
1739
|
export interface Project {
|
|
1645
1740
|
id: string;
|
|
1646
1741
|
org_id: string;
|
|
1647
1742
|
name: string;
|
|
1648
1743
|
key: string;
|
|
1649
1744
|
description: string | null;
|
|
1650
|
-
lead_id: string | null;
|
|
1651
1745
|
status: ProjectStatus;
|
|
1746
|
+
visibility: ProjectVisibility;
|
|
1652
1747
|
color: string | null;
|
|
1653
1748
|
sort_order: number;
|
|
1654
1749
|
created_at: string;
|
|
1655
1750
|
updated_at: string;
|
|
1751
|
+
/** The requesting user's own role, computed per request rather than stored.
|
|
1752
|
+
* Absent means they hold no membership (direct or team-derived). */
|
|
1753
|
+
my_role?: ProjectRole;
|
|
1754
|
+
/** True when the requesting user holds their own roster row — the fact
|
|
1755
|
+
* Leave acts on, as opposed to team-derived or org-admin standing. */
|
|
1756
|
+
my_direct_member?: boolean;
|
|
1757
|
+
/**
|
|
1758
|
+
* @deprecated Project authority now comes from the project roster. Retained
|
|
1759
|
+
* only for source compatibility during the pre-GA migration window; current
|
|
1760
|
+
* API responses omit it.
|
|
1761
|
+
*/
|
|
1762
|
+
lead_id?: string | null;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
/** One join-library row: the minimal metadata a non-member may see about a
|
|
1766
|
+
* discoverable project, plus the caller's own admission state. */
|
|
1767
|
+
export interface ProjectLibraryEntry {
|
|
1768
|
+
id: string;
|
|
1769
|
+
name: string;
|
|
1770
|
+
key: string;
|
|
1771
|
+
color?: string | null;
|
|
1772
|
+
visibility: ProjectVisibility;
|
|
1773
|
+
joined: boolean;
|
|
1774
|
+
requested: boolean;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
/** One pending join request, as the Collaborators pending tab renders it. */
|
|
1778
|
+
export interface ProjectJoinRequest {
|
|
1779
|
+
id: string;
|
|
1780
|
+
requester_id: string;
|
|
1781
|
+
created_at: string;
|
|
1782
|
+
requester?: User;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
/** One roster entry. `subject` is a bare user ID or a bare team ID; exactly one
|
|
1786
|
+
* of `user` / `team` is filled in for display, according to which kind it is. */
|
|
1787
|
+
export interface ProjectMember {
|
|
1788
|
+
project_id: string;
|
|
1789
|
+
subject: string;
|
|
1790
|
+
role: ProjectRole;
|
|
1791
|
+
added_by?: string;
|
|
1792
|
+
added_at: string;
|
|
1793
|
+
user?: User;
|
|
1794
|
+
team?: Team;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Adds one subject to a project's roster. Create-only: an existing row answers
|
|
1799
|
+
* `409 MEMBER_EXISTS` rather than being mutated — role changes go through the
|
|
1800
|
+
* member role endpoint. A subject naming nobody reachable answers
|
|
1801
|
+
* `400 UNKNOWN_SUBJECT`. Member rows are storable on every tier.
|
|
1802
|
+
*/
|
|
1803
|
+
export interface AddProjectMemberRequest {
|
|
1804
|
+
/** A bare user ID, or a bare team ID (`team_...`) for a team. */
|
|
1805
|
+
subject: string;
|
|
1806
|
+
/** Defaults to `member` when omitted. */
|
|
1807
|
+
role?: ProjectRole;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Changes one roster entry's role. Demoting the last manager answers
|
|
1812
|
+
* `400 LAST_MANAGER`; a concurrent roster change answers `409 CONFLICT`.
|
|
1813
|
+
*/
|
|
1814
|
+
export interface UpdateProjectMemberRequest {
|
|
1815
|
+
role: ProjectRole;
|
|
1656
1816
|
}
|
|
1657
1817
|
|
|
1658
1818
|
export interface CreateProjectRequest {
|
|
1659
1819
|
name: string;
|
|
1660
1820
|
key?: string;
|
|
1661
1821
|
description?: string;
|
|
1662
|
-
|
|
1822
|
+
/** Defaults to `public` when omitted. The creator is always written as the
|
|
1823
|
+
* first manager, which is what naming yourself lead used to mean. */
|
|
1824
|
+
visibility?: ProjectVisibility;
|
|
1663
1825
|
color?: string;
|
|
1826
|
+
/**
|
|
1827
|
+
* @deprecated Use the project roster after creation. Retained only for
|
|
1828
|
+
* source compatibility; the current API ignores this retired field.
|
|
1829
|
+
*/
|
|
1830
|
+
lead_id?: string;
|
|
1664
1831
|
}
|
|
1665
1832
|
|
|
1666
1833
|
export interface UpdateProjectRequest {
|
|
1667
1834
|
name?: string;
|
|
1668
1835
|
key?: string;
|
|
1669
1836
|
description?: string | null;
|
|
1670
|
-
lead_id?: string | null;
|
|
1671
1837
|
status?: ProjectStatus;
|
|
1838
|
+
visibility?: ProjectVisibility;
|
|
1672
1839
|
color?: string | null;
|
|
1673
1840
|
sort_order?: number;
|
|
1841
|
+
/**
|
|
1842
|
+
* @deprecated Use the project roster. Retained only for source
|
|
1843
|
+
* compatibility; the current API ignores this retired field.
|
|
1844
|
+
*/
|
|
1845
|
+
lead_id?: string | null;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export interface ProjectTaskStatusCounts {
|
|
1849
|
+
todo: number;
|
|
1850
|
+
in_progress: number;
|
|
1851
|
+
in_review: number;
|
|
1852
|
+
done: number;
|
|
1853
|
+
canceled: number;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
export interface ProjectTaskSummary {
|
|
1857
|
+
project_id: string;
|
|
1858
|
+
status_counts: ProjectTaskStatusCounts;
|
|
1859
|
+
completed_series: number[];
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
export interface ProjectTaskSummaryResponse {
|
|
1863
|
+
workspace_counts: {
|
|
1864
|
+
all_issues: number;
|
|
1865
|
+
my_issues: number;
|
|
1866
|
+
no_project: number;
|
|
1867
|
+
my_status_counts: ProjectTaskStatusCounts;
|
|
1868
|
+
};
|
|
1869
|
+
projects: ProjectTaskSummary[];
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
export interface TaskSubtaskSummary {
|
|
1873
|
+
task_id: string;
|
|
1874
|
+
total: number;
|
|
1875
|
+
done: number;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
export interface TaskSubtaskSummaryResponse {
|
|
1879
|
+
data: TaskSubtaskSummary[];
|
|
1674
1880
|
}
|
|
1675
1881
|
|
|
1676
1882
|
// ============================================================
|
|
@@ -2507,6 +2713,17 @@ export interface MessageNewData {
|
|
|
2507
2713
|
attachments?: Attachment[];
|
|
2508
2714
|
}
|
|
2509
2715
|
|
|
2716
|
+
/** @deprecated The `message.patch` event is retired — the server no longer
|
|
2717
|
+
* publishes it (content updates arrive as full-content `message.edit`). Kept
|
|
2718
|
+
* only so existing consumers keep compiling through the deprecation window;
|
|
2719
|
+
* a handler typed with this will never fire. */
|
|
2720
|
+
export interface JsonPatchOp {
|
|
2721
|
+
op: 'replace' | 'add';
|
|
2722
|
+
path: string;
|
|
2723
|
+
value: unknown;
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
/** @deprecated See {@link JsonPatchOp} — `message.patch` is never published. */
|
|
2510
2727
|
export interface MessagePatchData {
|
|
2511
2728
|
message_id: string;
|
|
2512
2729
|
chat_id: string;
|
|
@@ -2514,11 +2731,20 @@ export interface MessagePatchData {
|
|
|
2514
2731
|
ops: JsonPatchOp[];
|
|
2515
2732
|
}
|
|
2516
2733
|
|
|
2734
|
+
/**
|
|
2735
|
+
* Unified message-content-update event: every persisted content write (author
|
|
2736
|
+
* edit, server link-preview write-back) publishes it with the full content and
|
|
2737
|
+
* post-write version. Apply only when `version` is greater than the local one;
|
|
2738
|
+
* the "(edited)" marker keys off `edited_at` alone — a preview write-back
|
|
2739
|
+
* never creates or changes edited state (it carries the pre-existing value,
|
|
2740
|
+
* absent when the message was never author-edited).
|
|
2741
|
+
*/
|
|
2517
2742
|
export interface MessageEditData {
|
|
2518
2743
|
message_id: string;
|
|
2519
2744
|
chat_id: string;
|
|
2520
2745
|
content: MessageContent;
|
|
2521
|
-
|
|
2746
|
+
version: number;
|
|
2747
|
+
edited_at?: string;
|
|
2522
2748
|
}
|
|
2523
2749
|
|
|
2524
2750
|
export interface MessageDeleteData {
|
|
@@ -2616,6 +2842,13 @@ export interface OrgMemberRemovedData {
|
|
|
2616
2842
|
user_id: string;
|
|
2617
2843
|
}
|
|
2618
2844
|
|
|
2845
|
+
/** An org-scoped public member profile changed. */
|
|
2846
|
+
export interface OrgMemberProfileUpdatedData {
|
|
2847
|
+
org_id: string;
|
|
2848
|
+
user_id: string;
|
|
2849
|
+
profile_version: number;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2619
2852
|
// ---- Task Comment & Activity Types ----
|
|
2620
2853
|
|
|
2621
2854
|
export type TaskActivityAction = 'created' | 'field_changed' | 'commented';
|
|
@@ -3121,13 +3354,53 @@ export interface SlackChannelsPage {
|
|
|
3121
3354
|
next_cursor?: string;
|
|
3122
3355
|
}
|
|
3123
3356
|
|
|
3124
|
-
/** WeChat
|
|
3357
|
+
/** One WeChat friend resolved with its display name. */
|
|
3358
|
+
export interface WechatContactName {
|
|
3359
|
+
wxid: string;
|
|
3360
|
+
nick_name?: string;
|
|
3361
|
+
remark?: string;
|
|
3362
|
+
alias?: string;
|
|
3363
|
+
/** The label the WeChat app would show: remark > nickName > alias > wxid. */
|
|
3364
|
+
display: string;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
/** One WeChat saved chatroom with its display name. */
|
|
3368
|
+
export interface WechatChatroomEntry {
|
|
3369
|
+
chatroom_id: string;
|
|
3370
|
+
nick_name?: string;
|
|
3371
|
+
remark?: string;
|
|
3372
|
+
display: string;
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
/**
|
|
3376
|
+
* WeChat address book — the vendor's id-only lists enriched with display
|
|
3377
|
+
* names (getBriefInfo for friends, getChatroomInfo per chatroom). System
|
|
3378
|
+
* ids (weixin/fmessage/medianote) are filtered out.
|
|
3379
|
+
*/
|
|
3125
3380
|
export interface WechatContactsPage {
|
|
3126
|
-
friends:
|
|
3127
|
-
chatrooms:
|
|
3381
|
+
friends: WechatContactName[];
|
|
3382
|
+
chatrooms: WechatChatroomEntry[];
|
|
3128
3383
|
ghs: string[];
|
|
3129
3384
|
}
|
|
3130
3385
|
|
|
3386
|
+
/** The connected WeChat account's identity (getProfile + stored app id). */
|
|
3387
|
+
export interface WechatProfileView {
|
|
3388
|
+
wxid: string;
|
|
3389
|
+
alias?: string;
|
|
3390
|
+
nick_name?: string;
|
|
3391
|
+
app_id: string;
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
/** WeChat connection health: live online probe + identity + offline record. */
|
|
3395
|
+
export interface WechatStatusView {
|
|
3396
|
+
online: boolean;
|
|
3397
|
+
wxid: string;
|
|
3398
|
+
alias?: string;
|
|
3399
|
+
nick_name?: string;
|
|
3400
|
+
app_id: string;
|
|
3401
|
+
last_offline_at?: string;
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3131
3404
|
export interface SlackUserInfo {
|
|
3132
3405
|
id: string;
|
|
3133
3406
|
name: string;
|
|
@@ -3537,6 +3810,7 @@ export interface NotificationAlertData {
|
|
|
3537
3810
|
export type WsEventMap = {
|
|
3538
3811
|
hello: HelloData;
|
|
3539
3812
|
'message.new': MessageNewData;
|
|
3813
|
+
/** @deprecated Never published anymore — kept so existing `ws.on('message.patch', …)` registrations keep compiling. */
|
|
3540
3814
|
'message.patch': MessagePatchData;
|
|
3541
3815
|
'message.edit': MessageEditData;
|
|
3542
3816
|
'message.delete': MessageDeleteData;
|
|
@@ -3554,6 +3828,9 @@ export type WsEventMap = {
|
|
|
3554
3828
|
'task.created': TaskCreatedData;
|
|
3555
3829
|
'task.updated': TaskUpdatedData;
|
|
3556
3830
|
'task.deleted': TaskDeletedData;
|
|
3831
|
+
'label.created': LabelCreatedData;
|
|
3832
|
+
'label.updated': LabelUpdatedData;
|
|
3833
|
+
'label.deleted': LabelDeletedData;
|
|
3557
3834
|
'task.assigned': TaskAssignedData;
|
|
3558
3835
|
'task.comment.created': TaskCommentCreatedData;
|
|
3559
3836
|
'task.comment.updated': TaskCommentUpdatedData;
|
|
@@ -3571,6 +3848,7 @@ export type WsEventMap = {
|
|
|
3571
3848
|
'org.join_request.new': OrgJoinRequestNewEventData;
|
|
3572
3849
|
'org.invite_link.joined': OrgInviteLinkJoinedEventData;
|
|
3573
3850
|
'org.member.removed': OrgMemberRemovedData;
|
|
3851
|
+
'org.member.profile.updated': OrgMemberProfileUpdatedData;
|
|
3574
3852
|
'agent_config.update': AgentConfigUpdateData;
|
|
3575
3853
|
'presence.update': PresenceUpdateData;
|
|
3576
3854
|
'wiki.changeset.created': WikiChangesetCreatedData;
|
|
@@ -4727,6 +5005,54 @@ export interface SetEdgeProfileProxyRequest {
|
|
|
4727
5005
|
password?: string;
|
|
4728
5006
|
}
|
|
4729
5007
|
|
|
5008
|
+
/**
|
|
5009
|
+
* One normalized cookie in a hosted-profile cookie-seed import — the exact shape
|
|
5010
|
+
* the pod-side `session.cookies.set()` consumes (mirrors the desktop
|
|
5011
|
+
* cookie-import output). Web parses the manager's paste (a raw `Cookie` header +
|
|
5012
|
+
* target domain, or a Cookie-Editor JSON export) into an array of these before
|
|
5013
|
+
* the PUT. Values are write-only; the sanitized status never echoes them.
|
|
5014
|
+
*/
|
|
5015
|
+
export interface EdgeCookie {
|
|
5016
|
+
url: string;
|
|
5017
|
+
name: string;
|
|
5018
|
+
value: string;
|
|
5019
|
+
domain: string;
|
|
5020
|
+
path: string;
|
|
5021
|
+
secure: boolean;
|
|
5022
|
+
httpOnly: boolean;
|
|
5023
|
+
/** Unix epoch seconds; null for a session cookie (no persisted expiry). */
|
|
5024
|
+
expirationDate: number | null;
|
|
5025
|
+
sameSite: 'no_restriction' | 'lax' | 'strict' | null;
|
|
5026
|
+
}
|
|
5027
|
+
|
|
5028
|
+
/**
|
|
5029
|
+
* PUT body for a hosted profile's one-shot cookie seed: the full normalized
|
|
5030
|
+
* cookie array. Injected at the next cold start and consumed once. Clearing is
|
|
5031
|
+
* DELETE, never an empty PUT.
|
|
5032
|
+
*/
|
|
5033
|
+
export interface SetEdgeCookieSeedRequest {
|
|
5034
|
+
cookies: EdgeCookie[];
|
|
5035
|
+
}
|
|
5036
|
+
|
|
5037
|
+
/**
|
|
5038
|
+
* Sanitized cookie-seed status (hosted Cloud Profiles) — the GET response and
|
|
5039
|
+
* the PUT/DELETE result. NEVER carries cookie values: only the count and the
|
|
5040
|
+
* distinct target domains are exposed.
|
|
5041
|
+
*/
|
|
5042
|
+
export interface EdgeCookieSeedStatus {
|
|
5043
|
+
configured: boolean;
|
|
5044
|
+
cookie_count: number;
|
|
5045
|
+
domains: string[];
|
|
5046
|
+
/** Opaque compare-and-swap token for conditional PUT/DELETE (`cookieseed-<version>` ETag). */
|
|
5047
|
+
version: string;
|
|
5048
|
+
/** Authoritative mutation gate; false whenever a non-released lease exists. */
|
|
5049
|
+
can_mutate: boolean;
|
|
5050
|
+
/** Actual lease state blocking a mutation (never inferred from device status). */
|
|
5051
|
+
lease_status?: 'pending' | 'assigned' | 'active' | 'releasing' | 'repair';
|
|
5052
|
+
/** Suggested delay before re-reading authoritative state. */
|
|
5053
|
+
retry_after_seconds?: number | null;
|
|
5054
|
+
}
|
|
5055
|
+
|
|
4730
5056
|
export interface ClipConnection {
|
|
4731
5057
|
id: string;
|
|
4732
5058
|
clip_id: string;
|
|
@@ -4749,7 +5075,18 @@ export interface ClipConnection {
|
|
|
4749
5075
|
* would make `putClipMCPConfig({auth_type: 'oauth'})` type-legal while its
|
|
4750
5076
|
* declared return type is wrong. Reads use MCPConfigAuthType.
|
|
4751
5077
|
*/
|
|
4752
|
-
export type MCPAuthType = 'none' | 'bearer' | 'api_key';
|
|
5078
|
+
export type MCPAuthType = 'none' | 'bearer' | 'api_key' | 'basic';
|
|
5079
|
+
|
|
5080
|
+
/**
|
|
5081
|
+
* One declared credential input of an `api_key` clip (manifest
|
|
5082
|
+
* `mcp.auth_headers`): the header the value is delivered in and, for
|
|
5083
|
+
* `Authorization`, the `Bearer` scheme prefix. `bearer` remains the legacy
|
|
5084
|
+
* alias for the single `Authorization: Bearer` shape.
|
|
5085
|
+
*/
|
|
5086
|
+
export interface MCPAuthHeaderSlot {
|
|
5087
|
+
name: string;
|
|
5088
|
+
scheme?: 'Bearer';
|
|
5089
|
+
}
|
|
4753
5090
|
|
|
4754
5091
|
/**
|
|
4755
5092
|
* MCP clip auth modes a config can REPORT. A config authorized through the
|
|
@@ -4824,12 +5161,16 @@ export interface MCPToolInfo {
|
|
|
4824
5161
|
*/
|
|
4825
5162
|
export type MCPClientMode = 'preregistered' | 'cimd' | 'dcr';
|
|
4826
5163
|
|
|
5164
|
+
/** Where the OAuth client identity is owned. `platform` references a
|
|
5165
|
+
* deployment App; its shared secret is never copied into the org grant. */
|
|
5166
|
+
export type MCPOAuthClientSource = 'embedded' | 'platform';
|
|
5167
|
+
|
|
4827
5168
|
/**
|
|
4828
5169
|
* Redacted MCP server config of an MCP clip
|
|
4829
5170
|
* (`GET /orgs/{orgId}/clip-registry/{clipId}/mcp-config` — the org's DEFAULT
|
|
4830
5171
|
* connection — or `GET …/mcp-configs/{configId}`). The whole mcp-config
|
|
4831
|
-
* family
|
|
4832
|
-
* `403 MCP_CROSS_ORG_DISABLED
|
|
5172
|
+
* family also accepts an installed reviewed Official OAuth Clip across orgs;
|
|
5173
|
+
* every other cross-org Clip gets `403 MCP_CROSS_ORG_DISABLED`. The stored credential NEVER
|
|
4833
5174
|
* appears in any response — `credential_set` is the only credential fact.
|
|
4834
5175
|
*
|
|
4835
5176
|
* Multi-connection model: a clip holds one config row (credential slot) PER
|
|
@@ -4855,6 +5196,9 @@ export interface MCPConfigResponse {
|
|
|
4855
5196
|
/** Present while an oauth config holds a stored client identity
|
|
4856
5197
|
* (connected or needs_reauth); absent once disconnected. */
|
|
4857
5198
|
client_mode?: MCPClientMode;
|
|
5199
|
+
client_source?: MCPOAuthClientSource;
|
|
5200
|
+
/** True only when this grant uses the reviewed platform-owned OAuth App. */
|
|
5201
|
+
official_oauth?: boolean;
|
|
4858
5202
|
/**
|
|
4859
5203
|
* Opaque CAS token for If-Match on PUT/DELETE (lost-update protection).
|
|
4860
5204
|
* Version mismatch answers `409 MCP_CONFIG_STALE`.
|
|
@@ -4870,9 +5214,20 @@ export interface MCPConfigResponse {
|
|
|
4870
5214
|
* persists nothing.
|
|
4871
5215
|
*/
|
|
4872
5216
|
export interface MCPConfigPutRequest {
|
|
5217
|
+
/**
|
|
5218
|
+
* Required on the wire, but when the clip's manifest declares the server
|
|
5219
|
+
* an empty string means "use the declaration" — the server fills it in and
|
|
5220
|
+
* refuses a contradicting value. (The Console sends '' for declared clips.)
|
|
5221
|
+
*/
|
|
4873
5222
|
server_url: string;
|
|
4874
5223
|
auth_type: MCPAuthType;
|
|
4875
5224
|
credential?: string;
|
|
5225
|
+
/**
|
|
5226
|
+
* Slot-aligned multi-value form: one value per declared `auth_headers`
|
|
5227
|
+
* slot, or `[username, password]` for `basic`. Mutually exclusive with
|
|
5228
|
+
* `credential`.
|
|
5229
|
+
*/
|
|
5230
|
+
credentials?: string[];
|
|
4876
5231
|
}
|
|
4877
5232
|
|
|
4878
5233
|
/**
|
|
@@ -4891,6 +5246,8 @@ export interface MCPConfigCreateRequest {
|
|
|
4891
5246
|
server_url?: string;
|
|
4892
5247
|
auth_type: MCPAuthType | 'oauth';
|
|
4893
5248
|
credential?: string;
|
|
5249
|
+
/** See MCPConfigPutRequest.credentials. */
|
|
5250
|
+
credentials?: string[];
|
|
4894
5251
|
alias?: string;
|
|
4895
5252
|
oauth_client?: MCPOAuthClientParams;
|
|
4896
5253
|
}
|
|
@@ -4926,9 +5283,19 @@ export interface MCPConnectionSummary {
|
|
|
4926
5283
|
tools_refreshed_at?: string;
|
|
4927
5284
|
oauth_status?: MCPOAuthStatus;
|
|
4928
5285
|
client_mode?: MCPClientMode;
|
|
5286
|
+
client_source?: MCPOAuthClientSource;
|
|
5287
|
+
official_oauth?: boolean;
|
|
4929
5288
|
version: string;
|
|
4930
5289
|
}
|
|
4931
5290
|
|
|
5291
|
+
/** Result of the server-orchestrated Official MCP Clip removal. Local rows
|
|
5292
|
+
* are always removed on success; `revoked: false` warns that the provider may
|
|
5293
|
+
* still hold a grant requiring manual cleanup. */
|
|
5294
|
+
export interface MCPOfficialClipRemovalResponse {
|
|
5295
|
+
removed: boolean;
|
|
5296
|
+
revoked: boolean;
|
|
5297
|
+
}
|
|
5298
|
+
|
|
4932
5299
|
/**
|
|
4933
5300
|
* PATCH body of `/clip-connections/{connId}` (MCP connections only, human
|
|
4934
5301
|
* org-admin JWT): rename the slot and/or promote it to the org default
|
|
@@ -4991,13 +5358,33 @@ export interface PublishRegistryClipRequest {
|
|
|
4991
5358
|
files: Record<string, string>;
|
|
4992
5359
|
}
|
|
4993
5360
|
|
|
5361
|
+
/**
|
|
5362
|
+
* One granted agent's entry under `selected_agents` (ADR-019).
|
|
5363
|
+
*
|
|
5364
|
+
* - `connection_scope: 'all'` — the grant covers every connection of the clip
|
|
5365
|
+
* (what a legacy `agent_ids` write means). `connection_ids` must be [].
|
|
5366
|
+
* - `connection_scope: 'selected'` — the grant admits only the connections in
|
|
5367
|
+
* `connection_ids` (non-empty on write; a grant can still READ back with []
|
|
5368
|
+
* when its granted connections were deleted, and then admits nothing).
|
|
5369
|
+
*/
|
|
5370
|
+
export interface ClipAgentExecGrant {
|
|
5371
|
+
agent_id: string;
|
|
5372
|
+
connection_scope: 'all' | 'selected';
|
|
5373
|
+
/** Granted connection ids (`ccn_…`) under `selected`, sorted; [] under `all`. */
|
|
5374
|
+
connection_ids: string[];
|
|
5375
|
+
}
|
|
5376
|
+
|
|
4994
5377
|
/**
|
|
4995
5378
|
* A clip's per-org agent exec access (`GET/PUT /orgs/{orgId}/clips/{clipId}/exec-access`).
|
|
4996
5379
|
*
|
|
4997
5380
|
* - `all_agents` (default): every org agent may exec the clip.
|
|
4998
|
-
* - `selected_agents`: only the agents in `
|
|
4999
|
-
*
|
|
5000
|
-
* `clips/installed
|
|
5381
|
+
* - `selected_agents`: only the agents in `grants` may exec, each through the
|
|
5382
|
+
* connections its `connection_scope` admits; an empty list blocks every
|
|
5383
|
+
* agent. Denied agents also stop seeing the clip in `clips/installed`; exec
|
|
5384
|
+
* answers `403 CLIP_AGENT_NOT_ALLOWED` (no grant at all) or
|
|
5385
|
+
* `403 CLIP_AGENT_CONNECTION_NOT_ALLOWED` (grant does not cover the named
|
|
5386
|
+
* connection). Agents must always exec through a connection — a
|
|
5387
|
+
* connectionless agent exec answers `400 AGENT_CONNECTION_REQUIRED`.
|
|
5001
5388
|
*
|
|
5002
5389
|
* Decided by the CALLING org (an installer restricts its own agents, never the
|
|
5003
5390
|
* publisher's). Humans are never restricted; the PUT is human-only (an agent
|
|
@@ -5005,8 +5392,24 @@ export interface PublishRegistryClipRequest {
|
|
|
5005
5392
|
*/
|
|
5006
5393
|
export interface ClipAgentExecAccess {
|
|
5007
5394
|
mode: 'all_agents' | 'selected_agents';
|
|
5008
|
-
/**
|
|
5395
|
+
/**
|
|
5396
|
+
* Granted agent user ids under `selected_agents` — the flat projection of
|
|
5397
|
+
* `grants`, kept for older readers; always [] under `all_agents`.
|
|
5398
|
+
*/
|
|
5009
5399
|
agent_ids: string[];
|
|
5400
|
+
/** Per-agent connection scope under `selected_agents`, sorted by agent id. */
|
|
5401
|
+
grants: ClipAgentExecGrant[];
|
|
5402
|
+
}
|
|
5403
|
+
|
|
5404
|
+
/**
|
|
5405
|
+
* The PUT body for a clip's agent exec access. Two shapes, one semantic
|
|
5406
|
+
* space — pass EITHER `agent_ids` (legacy flat form; every listed agent gets
|
|
5407
|
+
* `connection_scope: 'all'`) OR `grants` (connection-scoped form), never both.
|
|
5408
|
+
*/
|
|
5409
|
+
export interface ClipAgentExecAccessUpdate {
|
|
5410
|
+
mode: 'all_agents' | 'selected_agents';
|
|
5411
|
+
agent_ids?: string[];
|
|
5412
|
+
grants?: ClipAgentExecGrant[];
|
|
5010
5413
|
}
|
|
5011
5414
|
|
|
5012
5415
|
/**
|
|
@@ -5021,6 +5424,10 @@ export interface ClipAgentExecAccess {
|
|
|
5021
5424
|
* here is refused (`400 HOSTED_CONNECTION_REQUIRED`).
|
|
5022
5425
|
* - neither: legacy BYOC fallback — resolves only to the caller's OWN online
|
|
5023
5426
|
* desktop device, never to a hosted one.
|
|
5427
|
+
*
|
|
5428
|
+
* AGENT principals must always pass `connection` (ADR-019): the device paths
|
|
5429
|
+
* answer `400 AGENT_CONNECTION_REQUIRED`, and a connection outside the agent's
|
|
5430
|
+
* granted scope answers `403 CLIP_AGENT_CONNECTION_NOT_ALLOWED`.
|
|
5024
5431
|
*/
|
|
5025
5432
|
export interface ExecEdgeClipRequest {
|
|
5026
5433
|
/**
|