@parall/sdk 1.54.0 → 1.55.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/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
 
@@ -478,6 +487,8 @@ export interface UpdateAgentInstructionsRequest {
478
487
  }
479
488
 
480
489
  // Team — a named group of org members, referenced in wiki ACLs as `@slug`.
490
+ export type TeamRole = 'member' | 'manager';
491
+
481
492
  export interface Team {
482
493
  id: string;
483
494
  org_id: string;
@@ -488,6 +499,51 @@ export interface Team {
488
499
  updated_at: string;
489
500
  }
490
501
 
502
+ /**
503
+ * Display fields a roster listing carries for each member. The server projects
504
+ * only these columns, so this is deliberately narrower than `User`: no email,
505
+ * phone, or last_seen_at reaches a roster response.
506
+ *
507
+ * `avatar_url` is optional rather than nullable because the server omits the
508
+ * field when unset.
509
+ */
510
+ export interface RosterUser {
511
+ id: string;
512
+ type: UserType;
513
+ display_name: string;
514
+ avatar_url?: string;
515
+ status: UserStatus;
516
+ }
517
+
518
+ export interface TeamMember {
519
+ team_id: string;
520
+ user_id: string;
521
+ role: TeamRole;
522
+ added_by: string;
523
+ added_at: string;
524
+ user?: RosterUser;
525
+ }
526
+
527
+ export interface CreateTeamRequest {
528
+ name: string;
529
+ slug: string;
530
+ }
531
+
532
+ export interface UpdateTeamRequest {
533
+ name: string;
534
+ /** Team slugs are immutable because wiki ACL rows store them as @slug. */
535
+ slug?: never;
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. */
@@ -1517,6 +1588,11 @@ export interface Task {
1517
1588
  * gate subscriber-management UI — do not re-derive the rule client-side.
1518
1589
  */
1519
1590
  can_manage_subscribers?: boolean;
1591
+ /**
1592
+ * Always present on label-aware HTTP/WS responses. Optional here only so
1593
+ * persisted Task rows from older clients can be read during migration.
1594
+ */
1595
+ labels?: Label[];
1520
1596
  }
1521
1597
 
1522
1598
  export interface TaskWatcher {
@@ -1590,6 +1666,7 @@ export interface CreateTaskRequest {
1590
1666
  planned_start_date?: string;
1591
1667
  /** Planned completion date, YYYY-MM-DD. */
1592
1668
  due_date?: string;
1669
+ label_ids?: string[];
1593
1670
  }
1594
1671
 
1595
1672
  export interface UpdateTaskRequest {
@@ -1616,6 +1693,11 @@ export interface UpdateTaskRequest {
1616
1693
  planned_start_date?: string | null;
1617
1694
  /** Planned completion date, YYYY-MM-DD; explicit null clears it. */
1618
1695
  due_date?: string | null;
1696
+ /**
1697
+ * Full-set replacement: absent leaves labels unchanged; [] or null clears.
1698
+ * Concurrent writers should prefer addTaskLabels/removeTaskLabel.
1699
+ */
1700
+ label_ids?: string[] | null;
1619
1701
  /**
1620
1702
  * Dispatch lane binding (agent senders during a typed dispatch turn).
1621
1703
  * dispatch_lane + dispatch_event_id bind the update to the claimed typed
@@ -1673,6 +1755,40 @@ export interface UpdateProjectRequest {
1673
1755
  sort_order?: number;
1674
1756
  }
1675
1757
 
1758
+ export interface ProjectTaskStatusCounts {
1759
+ todo: number;
1760
+ in_progress: number;
1761
+ in_review: number;
1762
+ done: number;
1763
+ canceled: number;
1764
+ }
1765
+
1766
+ export interface ProjectTaskSummary {
1767
+ project_id: string;
1768
+ status_counts: ProjectTaskStatusCounts;
1769
+ completed_series: number[];
1770
+ }
1771
+
1772
+ export interface ProjectTaskSummaryResponse {
1773
+ workspace_counts: {
1774
+ all_issues: number;
1775
+ my_issues: number;
1776
+ no_project: number;
1777
+ my_status_counts: ProjectTaskStatusCounts;
1778
+ };
1779
+ projects: ProjectTaskSummary[];
1780
+ }
1781
+
1782
+ export interface TaskSubtaskSummary {
1783
+ task_id: string;
1784
+ total: number;
1785
+ done: number;
1786
+ }
1787
+
1788
+ export interface TaskSubtaskSummaryResponse {
1789
+ data: TaskSubtaskSummary[];
1790
+ }
1791
+
1676
1792
  // ============================================================
1677
1793
  // Schedule Types
1678
1794
  // ============================================================
@@ -2616,6 +2732,13 @@ export interface OrgMemberRemovedData {
2616
2732
  user_id: string;
2617
2733
  }
2618
2734
 
2735
+ /** An org-scoped public member profile changed. */
2736
+ export interface OrgMemberProfileUpdatedData {
2737
+ org_id: string;
2738
+ user_id: string;
2739
+ profile_version: number;
2740
+ }
2741
+
2619
2742
  // ---- Task Comment & Activity Types ----
2620
2743
 
2621
2744
  export type TaskActivityAction = 'created' | 'field_changed' | 'commented';
@@ -3121,13 +3244,53 @@ export interface SlackChannelsPage {
3121
3244
  next_cursor?: string;
3122
3245
  }
3123
3246
 
3124
- /** WeChat address book (id lists only — the vendor returns no names). */
3247
+ /** One WeChat friend resolved with its display name. */
3248
+ export interface WechatContactName {
3249
+ wxid: string;
3250
+ nick_name?: string;
3251
+ remark?: string;
3252
+ alias?: string;
3253
+ /** The label the WeChat app would show: remark > nickName > alias > wxid. */
3254
+ display: string;
3255
+ }
3256
+
3257
+ /** One WeChat saved chatroom with its display name. */
3258
+ export interface WechatChatroomEntry {
3259
+ chatroom_id: string;
3260
+ nick_name?: string;
3261
+ remark?: string;
3262
+ display: string;
3263
+ }
3264
+
3265
+ /**
3266
+ * WeChat address book — the vendor's id-only lists enriched with display
3267
+ * names (getBriefInfo for friends, getChatroomInfo per chatroom). System
3268
+ * ids (weixin/fmessage/medianote) are filtered out.
3269
+ */
3125
3270
  export interface WechatContactsPage {
3126
- friends: string[];
3127
- chatrooms: string[];
3271
+ friends: WechatContactName[];
3272
+ chatrooms: WechatChatroomEntry[];
3128
3273
  ghs: string[];
3129
3274
  }
3130
3275
 
3276
+ /** The connected WeChat account's identity (getProfile + stored app id). */
3277
+ export interface WechatProfileView {
3278
+ wxid: string;
3279
+ alias?: string;
3280
+ nick_name?: string;
3281
+ app_id: string;
3282
+ }
3283
+
3284
+ /** WeChat connection health: live online probe + identity + offline record. */
3285
+ export interface WechatStatusView {
3286
+ online: boolean;
3287
+ wxid: string;
3288
+ alias?: string;
3289
+ nick_name?: string;
3290
+ app_id: string;
3291
+ last_offline_at?: string;
3292
+ }
3293
+
3131
3294
  export interface SlackUserInfo {
3132
3295
  id: string;
3133
3296
  name: string;
@@ -3554,6 +3717,9 @@ export type WsEventMap = {
3554
3717
  'task.created': TaskCreatedData;
3555
3718
  'task.updated': TaskUpdatedData;
3556
3719
  'task.deleted': TaskDeletedData;
3720
+ 'label.created': LabelCreatedData;
3721
+ 'label.updated': LabelUpdatedData;
3722
+ 'label.deleted': LabelDeletedData;
3557
3723
  'task.assigned': TaskAssignedData;
3558
3724
  'task.comment.created': TaskCommentCreatedData;
3559
3725
  'task.comment.updated': TaskCommentUpdatedData;
@@ -3571,6 +3737,7 @@ export type WsEventMap = {
3571
3737
  'org.join_request.new': OrgJoinRequestNewEventData;
3572
3738
  'org.invite_link.joined': OrgInviteLinkJoinedEventData;
3573
3739
  'org.member.removed': OrgMemberRemovedData;
3740
+ 'org.member.profile.updated': OrgMemberProfileUpdatedData;
3574
3741
  'agent_config.update': AgentConfigUpdateData;
3575
3742
  'presence.update': PresenceUpdateData;
3576
3743
  'wiki.changeset.created': WikiChangesetCreatedData;
@@ -4824,12 +4991,16 @@ export interface MCPToolInfo {
4824
4991
  */
4825
4992
  export type MCPClientMode = 'preregistered' | 'cimd' | 'dcr';
4826
4993
 
4994
+ /** Where the OAuth client identity is owned. `platform` references a
4995
+ * deployment App; its shared secret is never copied into the org grant. */
4996
+ export type MCPOAuthClientSource = 'embedded' | 'platform';
4997
+
4827
4998
  /**
4828
4999
  * Redacted MCP server config of an MCP clip
4829
5000
  * (`GET /orgs/{orgId}/clip-registry/{clipId}/mcp-config` — the org's DEFAULT
4830
5001
  * connection — or `GET …/mcp-configs/{configId}`). The whole mcp-config
4831
- * family is publisher-org only: cross-org installs get
4832
- * `403 MCP_CROSS_ORG_DISABLED`, reads included. The stored credential NEVER
5002
+ * family also accepts an installed reviewed Official OAuth Clip across orgs;
5003
+ * every other cross-org Clip gets `403 MCP_CROSS_ORG_DISABLED`. The stored credential NEVER
4833
5004
  * appears in any response — `credential_set` is the only credential fact.
4834
5005
  *
4835
5006
  * Multi-connection model: a clip holds one config row (credential slot) PER
@@ -4855,6 +5026,9 @@ export interface MCPConfigResponse {
4855
5026
  /** Present while an oauth config holds a stored client identity
4856
5027
  * (connected or needs_reauth); absent once disconnected. */
4857
5028
  client_mode?: MCPClientMode;
5029
+ client_source?: MCPOAuthClientSource;
5030
+ /** True only when this grant uses the reviewed platform-owned OAuth App. */
5031
+ official_oauth?: boolean;
4858
5032
  /**
4859
5033
  * Opaque CAS token for If-Match on PUT/DELETE (lost-update protection).
4860
5034
  * Version mismatch answers `409 MCP_CONFIG_STALE`.
@@ -4926,9 +5100,19 @@ export interface MCPConnectionSummary {
4926
5100
  tools_refreshed_at?: string;
4927
5101
  oauth_status?: MCPOAuthStatus;
4928
5102
  client_mode?: MCPClientMode;
5103
+ client_source?: MCPOAuthClientSource;
5104
+ official_oauth?: boolean;
4929
5105
  version: string;
4930
5106
  }
4931
5107
 
5108
+ /** Result of the server-orchestrated Official MCP Clip removal. Local rows
5109
+ * are always removed on success; `revoked: false` warns that the provider may
5110
+ * still hold a grant requiring manual cleanup. */
5111
+ export interface MCPOfficialClipRemovalResponse {
5112
+ removed: boolean;
5113
+ revoked: boolean;
5114
+ }
5115
+
4932
5116
  /**
4933
5117
  * PATCH body of `/clip-connections/{connId}` (MCP connections only, human
4934
5118
  * org-admin JWT): rename the slot and/or promote it to the org default