@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/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Label, LabelCreatedData, LabelDeletedData, LabelUpdatedData } from './task-label-types.js';
|
|
1
2
|
export type UserType = 'human' | 'agent';
|
|
2
3
|
export type UserStatus = 'active' | 'disabled';
|
|
3
4
|
export interface User {
|
|
@@ -79,6 +80,8 @@ export interface ChatMember {
|
|
|
79
80
|
pinned: boolean;
|
|
80
81
|
hidden: boolean;
|
|
81
82
|
joined_at: string;
|
|
83
|
+
/** Org-scoped public title. Omitted by older servers and for former DM peers. */
|
|
84
|
+
title?: string;
|
|
82
85
|
user?: User;
|
|
83
86
|
}
|
|
84
87
|
export interface UpdateChatMemberRequest {
|
|
@@ -373,15 +376,55 @@ export interface UpdateAgentInstructionsRequest {
|
|
|
373
376
|
instructions: string;
|
|
374
377
|
expected_version: number;
|
|
375
378
|
}
|
|
379
|
+
export type TeamRole = 'member' | 'manager';
|
|
376
380
|
export interface Team {
|
|
377
381
|
id: string;
|
|
378
382
|
org_id: string;
|
|
379
383
|
name: string;
|
|
380
|
-
slug
|
|
384
|
+
/** @deprecated Removed since migration 176 — teams have no slug anymore. */
|
|
385
|
+
slug?: string;
|
|
381
386
|
created_by: string;
|
|
382
387
|
created_at: string;
|
|
383
388
|
updated_at: string;
|
|
384
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* Display fields a roster listing carries for each member. The server projects
|
|
392
|
+
* only these columns, so this is deliberately narrower than `User`: no email,
|
|
393
|
+
* phone, or last_seen_at reaches a roster response.
|
|
394
|
+
*
|
|
395
|
+
* `avatar_url` is optional rather than nullable because the server omits the
|
|
396
|
+
* field when unset.
|
|
397
|
+
*/
|
|
398
|
+
export interface RosterUser {
|
|
399
|
+
id: string;
|
|
400
|
+
type: UserType;
|
|
401
|
+
display_name: string;
|
|
402
|
+
avatar_url?: string;
|
|
403
|
+
status: UserStatus;
|
|
404
|
+
}
|
|
405
|
+
export interface TeamMember {
|
|
406
|
+
team_id: string;
|
|
407
|
+
user_id: string;
|
|
408
|
+
role: TeamRole;
|
|
409
|
+
added_by: string;
|
|
410
|
+
added_at: string;
|
|
411
|
+
user?: RosterUser;
|
|
412
|
+
}
|
|
413
|
+
export interface CreateTeamRequest {
|
|
414
|
+
name: string;
|
|
415
|
+
/** @deprecated Accepted and ignored by the server since migration 176. */
|
|
416
|
+
slug?: string;
|
|
417
|
+
}
|
|
418
|
+
export interface UpdateTeamRequest {
|
|
419
|
+
name: string;
|
|
420
|
+
}
|
|
421
|
+
export interface AddTeamMemberRequest {
|
|
422
|
+
user_id: string;
|
|
423
|
+
role?: TeamRole;
|
|
424
|
+
}
|
|
425
|
+
export interface UpdateTeamMemberRequest {
|
|
426
|
+
role: TeamRole;
|
|
427
|
+
}
|
|
385
428
|
export type InvitationStatus = 'pending' | 'accepted' | 'declined' | 'revoked';
|
|
386
429
|
export interface OrgInvitation {
|
|
387
430
|
id: string;
|
|
@@ -592,7 +635,20 @@ export interface DeployTemplateRequest {
|
|
|
592
635
|
/** Hire-time per-agent adjustments (onboarding wizard S2). Keys are the
|
|
593
636
|
* template's agent keys; omitted agents keep template defaults. */
|
|
594
637
|
agent_overrides?: Record<string, DeployAgentOverride>;
|
|
638
|
+
/** Explicit onboarding S4 intent. Each ref must be an effective dependency
|
|
639
|
+
* of this team whose selected_agents restriction was established in S3.
|
|
640
|
+
* Deploy additively grants only the newly-created Agents that declare it. */
|
|
641
|
+
dependency_access_refs?: string[];
|
|
595
642
|
}
|
|
643
|
+
export interface TemplateDeploymentStatus {
|
|
644
|
+
deployment_id: string;
|
|
645
|
+
status: 'queued' | 'deploying' | 'failed';
|
|
646
|
+
error?: {
|
|
647
|
+
code: string;
|
|
648
|
+
message: string;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
export type TemplateDeploymentResult = TemplateDeploymentReport | TemplateDeploymentStatus;
|
|
596
652
|
/** Per-agent hire-time override. Substitutes values within the platform-legal
|
|
597
653
|
* surface; never adds capability. Dependencies may only disable (false)
|
|
598
654
|
* declared optional deps — required deps and undeclared refs are rejected. */
|
|
@@ -783,11 +839,6 @@ export interface DirectMessageResponse {
|
|
|
783
839
|
chat: Chat;
|
|
784
840
|
message: Message;
|
|
785
841
|
}
|
|
786
|
-
export interface JsonPatchOp {
|
|
787
|
-
op: 'replace' | 'add';
|
|
788
|
-
path: string;
|
|
789
|
-
value: unknown;
|
|
790
|
-
}
|
|
791
842
|
export interface CreateAgentRequest {
|
|
792
843
|
display_name: string;
|
|
793
844
|
agent_provider?: string;
|
|
@@ -1185,7 +1236,8 @@ export interface Task {
|
|
|
1185
1236
|
assignee_id: string | null;
|
|
1186
1237
|
creator_id: string;
|
|
1187
1238
|
parent_id: string | null;
|
|
1188
|
-
|
|
1239
|
+
/** Every Task belongs to exactly one Project; immutable after creation. */
|
|
1240
|
+
project_id: string;
|
|
1189
1241
|
seq_number: number | null;
|
|
1190
1242
|
identifier: string | null;
|
|
1191
1243
|
sort_order: number;
|
|
@@ -1209,11 +1261,16 @@ export interface Task {
|
|
|
1209
1261
|
deleted_at?: string | null;
|
|
1210
1262
|
/**
|
|
1211
1263
|
* Per-viewer: whether the requesting user may manage OTHER members' comment
|
|
1212
|
-
* subscriptions for this task (creator / assignee / project
|
|
1264
|
+
* subscriptions for this task (creator / assignee / project manager / org
|
|
1213
1265
|
* owner-admin). Populated on single-task GET; undefined elsewhere. Read this to
|
|
1214
1266
|
* gate subscriber-management UI — do not re-derive the rule client-side.
|
|
1215
1267
|
*/
|
|
1216
1268
|
can_manage_subscribers?: boolean;
|
|
1269
|
+
/**
|
|
1270
|
+
* Always present on label-aware HTTP/WS responses. Optional here only so
|
|
1271
|
+
* persisted Task rows from older clients can be read during migration.
|
|
1272
|
+
*/
|
|
1273
|
+
labels?: Label[];
|
|
1217
1274
|
}
|
|
1218
1275
|
export interface TaskWatcher {
|
|
1219
1276
|
task_id: string;
|
|
@@ -1272,13 +1329,20 @@ export interface CreateTaskRequest {
|
|
|
1272
1329
|
priority?: TaskPriority;
|
|
1273
1330
|
assignee_id?: string;
|
|
1274
1331
|
parent_id?: string;
|
|
1275
|
-
|
|
1332
|
+
/**
|
|
1333
|
+
* Required: every Task is created inside a Project (missing → 400
|
|
1334
|
+
* MISSING_FIELDS with `error.details.available_projects`; archived project →
|
|
1335
|
+
* 400 PROJECT_ARCHIVED). A parent task's subtasks must use the parent's
|
|
1336
|
+
* project (400 INVALID_PARENT otherwise). Immutable after creation.
|
|
1337
|
+
*/
|
|
1338
|
+
project_id: string;
|
|
1276
1339
|
source_chat_id?: string;
|
|
1277
1340
|
sort_order?: number;
|
|
1278
1341
|
/** Planned start date, YYYY-MM-DD. Must be <= due_date when both are set. */
|
|
1279
1342
|
planned_start_date?: string;
|
|
1280
1343
|
/** Planned completion date, YYYY-MM-DD. */
|
|
1281
1344
|
due_date?: string;
|
|
1345
|
+
label_ids?: string[];
|
|
1282
1346
|
}
|
|
1283
1347
|
export interface UpdateTaskRequest {
|
|
1284
1348
|
title?: string;
|
|
@@ -1287,7 +1351,6 @@ export interface UpdateTaskRequest {
|
|
|
1287
1351
|
priority?: TaskPriority;
|
|
1288
1352
|
assignee_id?: string | null;
|
|
1289
1353
|
parent_id?: string | null;
|
|
1290
|
-
project_id?: string | null;
|
|
1291
1354
|
sort_order?: number;
|
|
1292
1355
|
/**
|
|
1293
1356
|
* Ordering intent resolved server-side in the update transaction:
|
|
@@ -1304,6 +1367,11 @@ export interface UpdateTaskRequest {
|
|
|
1304
1367
|
planned_start_date?: string | null;
|
|
1305
1368
|
/** Planned completion date, YYYY-MM-DD; explicit null clears it. */
|
|
1306
1369
|
due_date?: string | null;
|
|
1370
|
+
/**
|
|
1371
|
+
* Full-set replacement: absent leaves labels unchanged; [] or null clears.
|
|
1372
|
+
* Concurrent writers should prefer addTaskLabels/removeTaskLabel.
|
|
1373
|
+
*/
|
|
1374
|
+
label_ids?: string[] | null;
|
|
1307
1375
|
/**
|
|
1308
1376
|
* Dispatch lane binding (agent senders during a typed dispatch turn).
|
|
1309
1377
|
* dispatch_lane + dispatch_event_id bind the update to the claimed typed
|
|
@@ -1322,34 +1390,143 @@ export interface CreateTaskRelationRequest {
|
|
|
1322
1390
|
relation_type: TaskRelationType;
|
|
1323
1391
|
}
|
|
1324
1392
|
export type ProjectStatus = 'active' | 'paused' | 'completed' | 'archived';
|
|
1393
|
+
/** Visibility only decides how someone becomes a member (self-join /
|
|
1394
|
+
* request+approval / invite-only); membership rights are identical on every
|
|
1395
|
+
* tier, and reads are always roster-scoped. */
|
|
1396
|
+
export type ProjectVisibility = 'public' | 'restricted' | 'private';
|
|
1397
|
+
/** A role held on a project roster. Managers administer the project; members
|
|
1398
|
+
* only reach it. Org owners and admins are implicit managers everywhere, which
|
|
1399
|
+
* is why a project can never become unmanageable. */
|
|
1400
|
+
export type ProjectRole = 'member' | 'manager';
|
|
1325
1401
|
export interface Project {
|
|
1326
1402
|
id: string;
|
|
1327
1403
|
org_id: string;
|
|
1328
1404
|
name: string;
|
|
1329
1405
|
key: string;
|
|
1330
1406
|
description: string | null;
|
|
1331
|
-
lead_id: string | null;
|
|
1332
1407
|
status: ProjectStatus;
|
|
1408
|
+
visibility: ProjectVisibility;
|
|
1333
1409
|
color: string | null;
|
|
1334
1410
|
sort_order: number;
|
|
1335
1411
|
created_at: string;
|
|
1336
1412
|
updated_at: string;
|
|
1413
|
+
/** The requesting user's own role, computed per request rather than stored.
|
|
1414
|
+
* Absent means they hold no membership (direct or team-derived). */
|
|
1415
|
+
my_role?: ProjectRole;
|
|
1416
|
+
/** True when the requesting user holds their own roster row — the fact
|
|
1417
|
+
* Leave acts on, as opposed to team-derived or org-admin standing. */
|
|
1418
|
+
my_direct_member?: boolean;
|
|
1419
|
+
/**
|
|
1420
|
+
* @deprecated Project authority now comes from the project roster. Retained
|
|
1421
|
+
* only for source compatibility during the pre-GA migration window; current
|
|
1422
|
+
* API responses omit it.
|
|
1423
|
+
*/
|
|
1424
|
+
lead_id?: string | null;
|
|
1425
|
+
}
|
|
1426
|
+
/** One join-library row: the minimal metadata a non-member may see about a
|
|
1427
|
+
* discoverable project, plus the caller's own admission state. */
|
|
1428
|
+
export interface ProjectLibraryEntry {
|
|
1429
|
+
id: string;
|
|
1430
|
+
name: string;
|
|
1431
|
+
key: string;
|
|
1432
|
+
color?: string | null;
|
|
1433
|
+
visibility: ProjectVisibility;
|
|
1434
|
+
joined: boolean;
|
|
1435
|
+
requested: boolean;
|
|
1436
|
+
}
|
|
1437
|
+
/** One pending join request, as the Collaborators pending tab renders it. */
|
|
1438
|
+
export interface ProjectJoinRequest {
|
|
1439
|
+
id: string;
|
|
1440
|
+
requester_id: string;
|
|
1441
|
+
created_at: string;
|
|
1442
|
+
requester?: User;
|
|
1443
|
+
}
|
|
1444
|
+
/** One roster entry. `subject` is a bare user ID or a bare team ID; exactly one
|
|
1445
|
+
* of `user` / `team` is filled in for display, according to which kind it is. */
|
|
1446
|
+
export interface ProjectMember {
|
|
1447
|
+
project_id: string;
|
|
1448
|
+
subject: string;
|
|
1449
|
+
role: ProjectRole;
|
|
1450
|
+
added_by?: string;
|
|
1451
|
+
added_at: string;
|
|
1452
|
+
user?: User;
|
|
1453
|
+
team?: Team;
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Adds one subject to a project's roster. Create-only: an existing row answers
|
|
1457
|
+
* `409 MEMBER_EXISTS` rather than being mutated — role changes go through the
|
|
1458
|
+
* member role endpoint. A subject naming nobody reachable answers
|
|
1459
|
+
* `400 UNKNOWN_SUBJECT`. Member rows are storable on every tier.
|
|
1460
|
+
*/
|
|
1461
|
+
export interface AddProjectMemberRequest {
|
|
1462
|
+
/** A bare user ID, or a bare team ID (`team_...`) for a team. */
|
|
1463
|
+
subject: string;
|
|
1464
|
+
/** Defaults to `member` when omitted. */
|
|
1465
|
+
role?: ProjectRole;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Changes one roster entry's role. Demoting the last manager answers
|
|
1469
|
+
* `400 LAST_MANAGER`; a concurrent roster change answers `409 CONFLICT`.
|
|
1470
|
+
*/
|
|
1471
|
+
export interface UpdateProjectMemberRequest {
|
|
1472
|
+
role: ProjectRole;
|
|
1337
1473
|
}
|
|
1338
1474
|
export interface CreateProjectRequest {
|
|
1339
1475
|
name: string;
|
|
1340
1476
|
key?: string;
|
|
1341
1477
|
description?: string;
|
|
1342
|
-
|
|
1478
|
+
/** Defaults to `public` when omitted. The creator is always written as the
|
|
1479
|
+
* first manager, which is what naming yourself lead used to mean. */
|
|
1480
|
+
visibility?: ProjectVisibility;
|
|
1343
1481
|
color?: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* @deprecated Use the project roster after creation. Retained only for
|
|
1484
|
+
* source compatibility; the current API ignores this retired field.
|
|
1485
|
+
*/
|
|
1486
|
+
lead_id?: string;
|
|
1344
1487
|
}
|
|
1345
1488
|
export interface UpdateProjectRequest {
|
|
1346
1489
|
name?: string;
|
|
1347
1490
|
key?: string;
|
|
1348
1491
|
description?: string | null;
|
|
1349
|
-
lead_id?: string | null;
|
|
1350
1492
|
status?: ProjectStatus;
|
|
1493
|
+
visibility?: ProjectVisibility;
|
|
1351
1494
|
color?: string | null;
|
|
1352
1495
|
sort_order?: number;
|
|
1496
|
+
/**
|
|
1497
|
+
* @deprecated Use the project roster. Retained only for source
|
|
1498
|
+
* compatibility; the current API ignores this retired field.
|
|
1499
|
+
*/
|
|
1500
|
+
lead_id?: string | null;
|
|
1501
|
+
}
|
|
1502
|
+
export interface ProjectTaskStatusCounts {
|
|
1503
|
+
todo: number;
|
|
1504
|
+
in_progress: number;
|
|
1505
|
+
in_review: number;
|
|
1506
|
+
done: number;
|
|
1507
|
+
canceled: number;
|
|
1508
|
+
}
|
|
1509
|
+
export interface ProjectTaskSummary {
|
|
1510
|
+
project_id: string;
|
|
1511
|
+
status_counts: ProjectTaskStatusCounts;
|
|
1512
|
+
completed_series: number[];
|
|
1513
|
+
}
|
|
1514
|
+
export interface ProjectTaskSummaryResponse {
|
|
1515
|
+
workspace_counts: {
|
|
1516
|
+
all_issues: number;
|
|
1517
|
+
my_issues: number;
|
|
1518
|
+
no_project: number;
|
|
1519
|
+
my_status_counts: ProjectTaskStatusCounts;
|
|
1520
|
+
};
|
|
1521
|
+
projects: ProjectTaskSummary[];
|
|
1522
|
+
}
|
|
1523
|
+
export interface TaskSubtaskSummary {
|
|
1524
|
+
task_id: string;
|
|
1525
|
+
total: number;
|
|
1526
|
+
done: number;
|
|
1527
|
+
}
|
|
1528
|
+
export interface TaskSubtaskSummaryResponse {
|
|
1529
|
+
data: TaskSubtaskSummary[];
|
|
1353
1530
|
}
|
|
1354
1531
|
export type ScheduleSpecType = 'cron' | 'interval' | 'one_shot';
|
|
1355
1532
|
export type ScheduleStatus = 'active' | 'paused' | 'completed' | 'cancelled';
|
|
@@ -2041,17 +2218,36 @@ export interface MessageNewData {
|
|
|
2041
2218
|
hints?: MessageHints | null;
|
|
2042
2219
|
attachments?: Attachment[];
|
|
2043
2220
|
}
|
|
2221
|
+
/** @deprecated The `message.patch` event is retired — the server no longer
|
|
2222
|
+
* publishes it (content updates arrive as full-content `message.edit`). Kept
|
|
2223
|
+
* only so existing consumers keep compiling through the deprecation window;
|
|
2224
|
+
* a handler typed with this will never fire. */
|
|
2225
|
+
export interface JsonPatchOp {
|
|
2226
|
+
op: 'replace' | 'add';
|
|
2227
|
+
path: string;
|
|
2228
|
+
value: unknown;
|
|
2229
|
+
}
|
|
2230
|
+
/** @deprecated See {@link JsonPatchOp} — `message.patch` is never published. */
|
|
2044
2231
|
export interface MessagePatchData {
|
|
2045
2232
|
message_id: string;
|
|
2046
2233
|
chat_id: string;
|
|
2047
2234
|
version: number;
|
|
2048
2235
|
ops: JsonPatchOp[];
|
|
2049
2236
|
}
|
|
2237
|
+
/**
|
|
2238
|
+
* Unified message-content-update event: every persisted content write (author
|
|
2239
|
+
* edit, server link-preview write-back) publishes it with the full content and
|
|
2240
|
+
* post-write version. Apply only when `version` is greater than the local one;
|
|
2241
|
+
* the "(edited)" marker keys off `edited_at` alone — a preview write-back
|
|
2242
|
+
* never creates or changes edited state (it carries the pre-existing value,
|
|
2243
|
+
* absent when the message was never author-edited).
|
|
2244
|
+
*/
|
|
2050
2245
|
export interface MessageEditData {
|
|
2051
2246
|
message_id: string;
|
|
2052
2247
|
chat_id: string;
|
|
2053
2248
|
content: MessageContent;
|
|
2054
|
-
|
|
2249
|
+
version: number;
|
|
2250
|
+
edited_at?: string;
|
|
2055
2251
|
}
|
|
2056
2252
|
export interface MessageDeleteData {
|
|
2057
2253
|
message_id: string;
|
|
@@ -2120,6 +2316,12 @@ export interface OrgMemberRemovedData {
|
|
|
2120
2316
|
org_id: string;
|
|
2121
2317
|
user_id: string;
|
|
2122
2318
|
}
|
|
2319
|
+
/** An org-scoped public member profile changed. */
|
|
2320
|
+
export interface OrgMemberProfileUpdatedData {
|
|
2321
|
+
org_id: string;
|
|
2322
|
+
user_id: string;
|
|
2323
|
+
profile_version: number;
|
|
2324
|
+
}
|
|
2123
2325
|
export type TaskActivityAction = 'created' | 'field_changed' | 'commented';
|
|
2124
2326
|
export interface TaskComment {
|
|
2125
2327
|
id: string;
|
|
@@ -2551,12 +2753,48 @@ export interface SlackChannelsPage {
|
|
|
2551
2753
|
channels: SlackChannelInfo[];
|
|
2552
2754
|
next_cursor?: string;
|
|
2553
2755
|
}
|
|
2554
|
-
/** WeChat
|
|
2756
|
+
/** One WeChat friend resolved with its display name. */
|
|
2757
|
+
export interface WechatContactName {
|
|
2758
|
+
wxid: string;
|
|
2759
|
+
nick_name?: string;
|
|
2760
|
+
remark?: string;
|
|
2761
|
+
alias?: string;
|
|
2762
|
+
/** The label the WeChat app would show: remark > nickName > alias > wxid. */
|
|
2763
|
+
display: string;
|
|
2764
|
+
}
|
|
2765
|
+
/** One WeChat saved chatroom with its display name. */
|
|
2766
|
+
export interface WechatChatroomEntry {
|
|
2767
|
+
chatroom_id: string;
|
|
2768
|
+
nick_name?: string;
|
|
2769
|
+
remark?: string;
|
|
2770
|
+
display: string;
|
|
2771
|
+
}
|
|
2772
|
+
/**
|
|
2773
|
+
* WeChat address book — the vendor's id-only lists enriched with display
|
|
2774
|
+
* names (getBriefInfo for friends, getChatroomInfo per chatroom). System
|
|
2775
|
+
* ids (weixin/fmessage/medianote) are filtered out.
|
|
2776
|
+
*/
|
|
2555
2777
|
export interface WechatContactsPage {
|
|
2556
|
-
friends:
|
|
2557
|
-
chatrooms:
|
|
2778
|
+
friends: WechatContactName[];
|
|
2779
|
+
chatrooms: WechatChatroomEntry[];
|
|
2558
2780
|
ghs: string[];
|
|
2559
2781
|
}
|
|
2782
|
+
/** The connected WeChat account's identity (getProfile + stored app id). */
|
|
2783
|
+
export interface WechatProfileView {
|
|
2784
|
+
wxid: string;
|
|
2785
|
+
alias?: string;
|
|
2786
|
+
nick_name?: string;
|
|
2787
|
+
app_id: string;
|
|
2788
|
+
}
|
|
2789
|
+
/** WeChat connection health: live online probe + identity + offline record. */
|
|
2790
|
+
export interface WechatStatusView {
|
|
2791
|
+
online: boolean;
|
|
2792
|
+
wxid: string;
|
|
2793
|
+
alias?: string;
|
|
2794
|
+
nick_name?: string;
|
|
2795
|
+
app_id: string;
|
|
2796
|
+
last_offline_at?: string;
|
|
2797
|
+
}
|
|
2560
2798
|
export interface SlackUserInfo {
|
|
2561
2799
|
id: string;
|
|
2562
2800
|
name: string;
|
|
@@ -2911,6 +3149,7 @@ export interface NotificationAlertData {
|
|
|
2911
3149
|
export type WsEventMap = {
|
|
2912
3150
|
hello: HelloData;
|
|
2913
3151
|
'message.new': MessageNewData;
|
|
3152
|
+
/** @deprecated Never published anymore — kept so existing `ws.on('message.patch', …)` registrations keep compiling. */
|
|
2914
3153
|
'message.patch': MessagePatchData;
|
|
2915
3154
|
'message.edit': MessageEditData;
|
|
2916
3155
|
'message.delete': MessageDeleteData;
|
|
@@ -2930,6 +3169,9 @@ export type WsEventMap = {
|
|
|
2930
3169
|
'task.created': TaskCreatedData;
|
|
2931
3170
|
'task.updated': TaskUpdatedData;
|
|
2932
3171
|
'task.deleted': TaskDeletedData;
|
|
3172
|
+
'label.created': LabelCreatedData;
|
|
3173
|
+
'label.updated': LabelUpdatedData;
|
|
3174
|
+
'label.deleted': LabelDeletedData;
|
|
2933
3175
|
'task.assigned': TaskAssignedData;
|
|
2934
3176
|
'task.comment.created': TaskCommentCreatedData;
|
|
2935
3177
|
'task.comment.updated': TaskCommentUpdatedData;
|
|
@@ -2947,6 +3189,7 @@ export type WsEventMap = {
|
|
|
2947
3189
|
'org.join_request.new': OrgJoinRequestNewEventData;
|
|
2948
3190
|
'org.invite_link.joined': OrgInviteLinkJoinedEventData;
|
|
2949
3191
|
'org.member.removed': OrgMemberRemovedData;
|
|
3192
|
+
'org.member.profile.updated': OrgMemberProfileUpdatedData;
|
|
2950
3193
|
'agent_config.update': AgentConfigUpdateData;
|
|
2951
3194
|
'presence.update': PresenceUpdateData;
|
|
2952
3195
|
'wiki.changeset.created': WikiChangesetCreatedData;
|
|
@@ -3937,6 +4180,51 @@ export interface SetEdgeProfileProxyRequest {
|
|
|
3937
4180
|
username?: string;
|
|
3938
4181
|
password?: string;
|
|
3939
4182
|
}
|
|
4183
|
+
/**
|
|
4184
|
+
* One normalized cookie in a hosted-profile cookie-seed import — the exact shape
|
|
4185
|
+
* the pod-side `session.cookies.set()` consumes (mirrors the desktop
|
|
4186
|
+
* cookie-import output). Web parses the manager's paste (a raw `Cookie` header +
|
|
4187
|
+
* target domain, or a Cookie-Editor JSON export) into an array of these before
|
|
4188
|
+
* the PUT. Values are write-only; the sanitized status never echoes them.
|
|
4189
|
+
*/
|
|
4190
|
+
export interface EdgeCookie {
|
|
4191
|
+
url: string;
|
|
4192
|
+
name: string;
|
|
4193
|
+
value: string;
|
|
4194
|
+
domain: string;
|
|
4195
|
+
path: string;
|
|
4196
|
+
secure: boolean;
|
|
4197
|
+
httpOnly: boolean;
|
|
4198
|
+
/** Unix epoch seconds; null for a session cookie (no persisted expiry). */
|
|
4199
|
+
expirationDate: number | null;
|
|
4200
|
+
sameSite: 'no_restriction' | 'lax' | 'strict' | null;
|
|
4201
|
+
}
|
|
4202
|
+
/**
|
|
4203
|
+
* PUT body for a hosted profile's one-shot cookie seed: the full normalized
|
|
4204
|
+
* cookie array. Injected at the next cold start and consumed once. Clearing is
|
|
4205
|
+
* DELETE, never an empty PUT.
|
|
4206
|
+
*/
|
|
4207
|
+
export interface SetEdgeCookieSeedRequest {
|
|
4208
|
+
cookies: EdgeCookie[];
|
|
4209
|
+
}
|
|
4210
|
+
/**
|
|
4211
|
+
* Sanitized cookie-seed status (hosted Cloud Profiles) — the GET response and
|
|
4212
|
+
* the PUT/DELETE result. NEVER carries cookie values: only the count and the
|
|
4213
|
+
* distinct target domains are exposed.
|
|
4214
|
+
*/
|
|
4215
|
+
export interface EdgeCookieSeedStatus {
|
|
4216
|
+
configured: boolean;
|
|
4217
|
+
cookie_count: number;
|
|
4218
|
+
domains: string[];
|
|
4219
|
+
/** Opaque compare-and-swap token for conditional PUT/DELETE (`cookieseed-<version>` ETag). */
|
|
4220
|
+
version: string;
|
|
4221
|
+
/** Authoritative mutation gate; false whenever a non-released lease exists. */
|
|
4222
|
+
can_mutate: boolean;
|
|
4223
|
+
/** Actual lease state blocking a mutation (never inferred from device status). */
|
|
4224
|
+
lease_status?: 'pending' | 'assigned' | 'active' | 'releasing' | 'repair';
|
|
4225
|
+
/** Suggested delay before re-reading authoritative state. */
|
|
4226
|
+
retry_after_seconds?: number | null;
|
|
4227
|
+
}
|
|
3940
4228
|
export interface ClipConnection {
|
|
3941
4229
|
id: string;
|
|
3942
4230
|
clip_id: string;
|
|
@@ -3958,7 +4246,17 @@ export interface ClipConnection {
|
|
|
3958
4246
|
* would make `putClipMCPConfig({auth_type: 'oauth'})` type-legal while its
|
|
3959
4247
|
* declared return type is wrong. Reads use MCPConfigAuthType.
|
|
3960
4248
|
*/
|
|
3961
|
-
export type MCPAuthType = 'none' | 'bearer' | 'api_key';
|
|
4249
|
+
export type MCPAuthType = 'none' | 'bearer' | 'api_key' | 'basic';
|
|
4250
|
+
/**
|
|
4251
|
+
* One declared credential input of an `api_key` clip (manifest
|
|
4252
|
+
* `mcp.auth_headers`): the header the value is delivered in and, for
|
|
4253
|
+
* `Authorization`, the `Bearer` scheme prefix. `bearer` remains the legacy
|
|
4254
|
+
* alias for the single `Authorization: Bearer` shape.
|
|
4255
|
+
*/
|
|
4256
|
+
export interface MCPAuthHeaderSlot {
|
|
4257
|
+
name: string;
|
|
4258
|
+
scheme?: 'Bearer';
|
|
4259
|
+
}
|
|
3962
4260
|
/**
|
|
3963
4261
|
* MCP clip auth modes a config can REPORT. A config authorized through the
|
|
3964
4262
|
* OAuth flow reads back as `oauth`, so every reader must handle it even
|
|
@@ -4025,12 +4323,15 @@ export interface MCPToolInfo {
|
|
|
4025
4323
|
* document, `dcr` = RFC 7591 dynamic registration.
|
|
4026
4324
|
*/
|
|
4027
4325
|
export type MCPClientMode = 'preregistered' | 'cimd' | 'dcr';
|
|
4326
|
+
/** Where the OAuth client identity is owned. `platform` references a
|
|
4327
|
+
* deployment App; its shared secret is never copied into the org grant. */
|
|
4328
|
+
export type MCPOAuthClientSource = 'embedded' | 'platform';
|
|
4028
4329
|
/**
|
|
4029
4330
|
* Redacted MCP server config of an MCP clip
|
|
4030
4331
|
* (`GET /orgs/{orgId}/clip-registry/{clipId}/mcp-config` — the org's DEFAULT
|
|
4031
4332
|
* connection — or `GET …/mcp-configs/{configId}`). The whole mcp-config
|
|
4032
|
-
* family
|
|
4033
|
-
* `403 MCP_CROSS_ORG_DISABLED
|
|
4333
|
+
* family also accepts an installed reviewed Official OAuth Clip across orgs;
|
|
4334
|
+
* every other cross-org Clip gets `403 MCP_CROSS_ORG_DISABLED`. The stored credential NEVER
|
|
4034
4335
|
* appears in any response — `credential_set` is the only credential fact.
|
|
4035
4336
|
*
|
|
4036
4337
|
* Multi-connection model: a clip holds one config row (credential slot) PER
|
|
@@ -4056,6 +4357,9 @@ export interface MCPConfigResponse {
|
|
|
4056
4357
|
/** Present while an oauth config holds a stored client identity
|
|
4057
4358
|
* (connected or needs_reauth); absent once disconnected. */
|
|
4058
4359
|
client_mode?: MCPClientMode;
|
|
4360
|
+
client_source?: MCPOAuthClientSource;
|
|
4361
|
+
/** True only when this grant uses the reviewed platform-owned OAuth App. */
|
|
4362
|
+
official_oauth?: boolean;
|
|
4059
4363
|
/**
|
|
4060
4364
|
* Opaque CAS token for If-Match on PUT/DELETE (lost-update protection).
|
|
4061
4365
|
* Version mismatch answers `409 MCP_CONFIG_STALE`.
|
|
@@ -4070,9 +4374,20 @@ export interface MCPConfigResponse {
|
|
|
4070
4374
|
* persists nothing.
|
|
4071
4375
|
*/
|
|
4072
4376
|
export interface MCPConfigPutRequest {
|
|
4377
|
+
/**
|
|
4378
|
+
* Required on the wire, but when the clip's manifest declares the server
|
|
4379
|
+
* an empty string means "use the declaration" — the server fills it in and
|
|
4380
|
+
* refuses a contradicting value. (The Console sends '' for declared clips.)
|
|
4381
|
+
*/
|
|
4073
4382
|
server_url: string;
|
|
4074
4383
|
auth_type: MCPAuthType;
|
|
4075
4384
|
credential?: string;
|
|
4385
|
+
/**
|
|
4386
|
+
* Slot-aligned multi-value form: one value per declared `auth_headers`
|
|
4387
|
+
* slot, or `[username, password]` for `basic`. Mutually exclusive with
|
|
4388
|
+
* `credential`.
|
|
4389
|
+
*/
|
|
4390
|
+
credentials?: string[];
|
|
4076
4391
|
}
|
|
4077
4392
|
/**
|
|
4078
4393
|
* POST body of `…/clip-registry/{clipId}/mcp-configs` — a NEW connection
|
|
@@ -4090,6 +4405,8 @@ export interface MCPConfigCreateRequest {
|
|
|
4090
4405
|
server_url?: string;
|
|
4091
4406
|
auth_type: MCPAuthType | 'oauth';
|
|
4092
4407
|
credential?: string;
|
|
4408
|
+
/** See MCPConfigPutRequest.credentials. */
|
|
4409
|
+
credentials?: string[];
|
|
4093
4410
|
alias?: string;
|
|
4094
4411
|
oauth_client?: MCPOAuthClientParams;
|
|
4095
4412
|
}
|
|
@@ -4123,8 +4440,17 @@ export interface MCPConnectionSummary {
|
|
|
4123
4440
|
tools_refreshed_at?: string;
|
|
4124
4441
|
oauth_status?: MCPOAuthStatus;
|
|
4125
4442
|
client_mode?: MCPClientMode;
|
|
4443
|
+
client_source?: MCPOAuthClientSource;
|
|
4444
|
+
official_oauth?: boolean;
|
|
4126
4445
|
version: string;
|
|
4127
4446
|
}
|
|
4447
|
+
/** Result of the server-orchestrated Official MCP Clip removal. Local rows
|
|
4448
|
+
* are always removed on success; `revoked: false` warns that the provider may
|
|
4449
|
+
* still hold a grant requiring manual cleanup. */
|
|
4450
|
+
export interface MCPOfficialClipRemovalResponse {
|
|
4451
|
+
removed: boolean;
|
|
4452
|
+
revoked: boolean;
|
|
4453
|
+
}
|
|
4128
4454
|
/**
|
|
4129
4455
|
* PATCH body of `/clip-connections/{connId}` (MCP connections only, human
|
|
4130
4456
|
* org-admin JWT): rename the slot and/or promote it to the org default
|
|
@@ -4183,13 +4509,32 @@ export interface PublishRegistryClipRequest {
|
|
|
4183
4509
|
/** filename → UTF-8 content (e.g. `search.js`). */
|
|
4184
4510
|
files: Record<string, string>;
|
|
4185
4511
|
}
|
|
4512
|
+
/**
|
|
4513
|
+
* One granted agent's entry under `selected_agents` (ADR-019).
|
|
4514
|
+
*
|
|
4515
|
+
* - `connection_scope: 'all'` — the grant covers every connection of the clip
|
|
4516
|
+
* (what a legacy `agent_ids` write means). `connection_ids` must be [].
|
|
4517
|
+
* - `connection_scope: 'selected'` — the grant admits only the connections in
|
|
4518
|
+
* `connection_ids` (non-empty on write; a grant can still READ back with []
|
|
4519
|
+
* when its granted connections were deleted, and then admits nothing).
|
|
4520
|
+
*/
|
|
4521
|
+
export interface ClipAgentExecGrant {
|
|
4522
|
+
agent_id: string;
|
|
4523
|
+
connection_scope: 'all' | 'selected';
|
|
4524
|
+
/** Granted connection ids (`ccn_…`) under `selected`, sorted; [] under `all`. */
|
|
4525
|
+
connection_ids: string[];
|
|
4526
|
+
}
|
|
4186
4527
|
/**
|
|
4187
4528
|
* A clip's per-org agent exec access (`GET/PUT /orgs/{orgId}/clips/{clipId}/exec-access`).
|
|
4188
4529
|
*
|
|
4189
4530
|
* - `all_agents` (default): every org agent may exec the clip.
|
|
4190
|
-
* - `selected_agents`: only the agents in `
|
|
4191
|
-
*
|
|
4192
|
-
* `clips/installed
|
|
4531
|
+
* - `selected_agents`: only the agents in `grants` may exec, each through the
|
|
4532
|
+
* connections its `connection_scope` admits; an empty list blocks every
|
|
4533
|
+
* agent. Denied agents also stop seeing the clip in `clips/installed`; exec
|
|
4534
|
+
* answers `403 CLIP_AGENT_NOT_ALLOWED` (no grant at all) or
|
|
4535
|
+
* `403 CLIP_AGENT_CONNECTION_NOT_ALLOWED` (grant does not cover the named
|
|
4536
|
+
* connection). Agents must always exec through a connection — a
|
|
4537
|
+
* connectionless agent exec answers `400 AGENT_CONNECTION_REQUIRED`.
|
|
4193
4538
|
*
|
|
4194
4539
|
* Decided by the CALLING org (an installer restricts its own agents, never the
|
|
4195
4540
|
* publisher's). Humans are never restricted; the PUT is human-only (an agent
|
|
@@ -4197,8 +4542,23 @@ export interface PublishRegistryClipRequest {
|
|
|
4197
4542
|
*/
|
|
4198
4543
|
export interface ClipAgentExecAccess {
|
|
4199
4544
|
mode: 'all_agents' | 'selected_agents';
|
|
4200
|
-
/**
|
|
4545
|
+
/**
|
|
4546
|
+
* Granted agent user ids under `selected_agents` — the flat projection of
|
|
4547
|
+
* `grants`, kept for older readers; always [] under `all_agents`.
|
|
4548
|
+
*/
|
|
4201
4549
|
agent_ids: string[];
|
|
4550
|
+
/** Per-agent connection scope under `selected_agents`, sorted by agent id. */
|
|
4551
|
+
grants: ClipAgentExecGrant[];
|
|
4552
|
+
}
|
|
4553
|
+
/**
|
|
4554
|
+
* The PUT body for a clip's agent exec access. Two shapes, one semantic
|
|
4555
|
+
* space — pass EITHER `agent_ids` (legacy flat form; every listed agent gets
|
|
4556
|
+
* `connection_scope: 'all'`) OR `grants` (connection-scoped form), never both.
|
|
4557
|
+
*/
|
|
4558
|
+
export interface ClipAgentExecAccessUpdate {
|
|
4559
|
+
mode: 'all_agents' | 'selected_agents';
|
|
4560
|
+
agent_ids?: string[];
|
|
4561
|
+
grants?: ClipAgentExecGrant[];
|
|
4202
4562
|
}
|
|
4203
4563
|
/**
|
|
4204
4564
|
* Execute a registry (Edge) clip command on an Edge device
|
|
@@ -4212,6 +4572,10 @@ export interface ClipAgentExecAccess {
|
|
|
4212
4572
|
* here is refused (`400 HOSTED_CONNECTION_REQUIRED`).
|
|
4213
4573
|
* - neither: legacy BYOC fallback — resolves only to the caller's OWN online
|
|
4214
4574
|
* desktop device, never to a hosted one.
|
|
4575
|
+
*
|
|
4576
|
+
* AGENT principals must always pass `connection` (ADR-019): the device paths
|
|
4577
|
+
* answer `400 AGENT_CONNECTION_REQUIRED`, and a connection outside the agent's
|
|
4578
|
+
* granted scope answers `403 CLIP_AGENT_CONNECTION_NOT_ALLOWED`.
|
|
4215
4579
|
*/
|
|
4216
4580
|
export interface ExecEdgeClipRequest {
|
|
4217
4581
|
/**
|