@parall/sdk 1.44.0 → 1.46.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 +46 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +50 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -0
- package/dist/types.d.ts +179 -11
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +83 -3
- package/src/constants.ts +13 -0
- package/src/types.ts +193 -12
package/src/types.ts
CHANGED
|
@@ -1159,6 +1159,8 @@ export interface Task {
|
|
|
1159
1159
|
seq_number: number | null;
|
|
1160
1160
|
identifier: string | null;
|
|
1161
1161
|
sort_order: number;
|
|
1162
|
+
/** Planned completion date, YYYY-MM-DD (calendar date, timezone-free). */
|
|
1163
|
+
due_date: string | null;
|
|
1162
1164
|
assignee?: User;
|
|
1163
1165
|
creator?: User;
|
|
1164
1166
|
created_at: string;
|
|
@@ -1244,6 +1246,8 @@ export interface CreateTaskRequest {
|
|
|
1244
1246
|
project_id?: string;
|
|
1245
1247
|
source_chat_id?: string;
|
|
1246
1248
|
sort_order?: number;
|
|
1249
|
+
/** Planned completion date, YYYY-MM-DD. */
|
|
1250
|
+
due_date?: string;
|
|
1247
1251
|
}
|
|
1248
1252
|
|
|
1249
1253
|
export interface UpdateTaskRequest {
|
|
@@ -1255,6 +1259,15 @@ export interface UpdateTaskRequest {
|
|
|
1255
1259
|
parent_id?: string | null;
|
|
1256
1260
|
project_id?: string | null;
|
|
1257
1261
|
sort_order?: number;
|
|
1262
|
+
/**
|
|
1263
|
+
* Ordering intent resolved server-side in the update transaction:
|
|
1264
|
+
* 'end' appends the task to its (possibly new) status column. Preferred
|
|
1265
|
+
* over computing sort_order from client caches, which may not hold the
|
|
1266
|
+
* full column. Mutually exclusive with sort_order.
|
|
1267
|
+
*/
|
|
1268
|
+
placement?: 'end';
|
|
1269
|
+
/** Planned completion date, YYYY-MM-DD; explicit null clears it. */
|
|
1270
|
+
due_date?: string | null;
|
|
1258
1271
|
/**
|
|
1259
1272
|
* Dispatch lane binding (agent senders during a typed dispatch turn).
|
|
1260
1273
|
* dispatch_lane + dispatch_event_id bind the update to the claimed typed
|
|
@@ -1319,6 +1332,13 @@ export interface UpdateProjectRequest {
|
|
|
1319
1332
|
export type ScheduleSpecType = 'cron' | 'interval' | 'one_shot';
|
|
1320
1333
|
export type ScheduleStatus = 'active' | 'paused' | 'completed' | 'cancelled';
|
|
1321
1334
|
export type ScheduleCancelReason = 'user_cancel' | 'attached_gone' | 'creator_ineligible';
|
|
1335
|
+
/**
|
|
1336
|
+
* Why a schedule sits in its current non-active state. Cancel reasons appear
|
|
1337
|
+
* only on `cancelled` rows; `attendee_unreachable` appears only on `paused`
|
|
1338
|
+
* rows (stamped by the scheduler when every attendee is an agent on a
|
|
1339
|
+
* terminated machine; cleared on resume — a user pause keeps null).
|
|
1340
|
+
*/
|
|
1341
|
+
export type ScheduleStatusReason = ScheduleCancelReason | 'attendee_unreachable';
|
|
1322
1342
|
export type ScheduleRunStatus = 'delivered' | 'missed' | 'failed';
|
|
1323
1343
|
|
|
1324
1344
|
export interface Schedule {
|
|
@@ -1342,7 +1362,10 @@ export interface Schedule {
|
|
|
1342
1362
|
duration_seconds: number | null;
|
|
1343
1363
|
target_ids: string[];
|
|
1344
1364
|
status: ScheduleStatus;
|
|
1345
|
-
|
|
1365
|
+
/** Optional during the rename rollout: pre-135 servers emit only `cancel_reason`. Read via `status_reason ?? cancel_reason`. */
|
|
1366
|
+
status_reason?: ScheduleStatusReason | null;
|
|
1367
|
+
/** @deprecated Rename-rollout alias of `status_reason`, emitted on cancelled rows only (never carries pause reasons); read `status_reason ?? cancel_reason`. */
|
|
1368
|
+
cancel_reason?: ScheduleCancelReason | null;
|
|
1346
1369
|
next_fire_at: string | null;
|
|
1347
1370
|
last_fire_at: string | null;
|
|
1348
1371
|
run_count: number;
|
|
@@ -1838,6 +1861,29 @@ export interface WikiAnchorStatusResponse {
|
|
|
1838
1861
|
results: WikiAnchorStatus[];
|
|
1839
1862
|
}
|
|
1840
1863
|
|
|
1864
|
+
export interface WikiAnchorResolveRequest {
|
|
1865
|
+
targets: string[];
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
export type WikiAnchorResolveState = 'attached' | 'detached' | 'file_missing' | 'unknown';
|
|
1869
|
+
|
|
1870
|
+
export interface WikiAnchorResolveRange {
|
|
1871
|
+
start: number;
|
|
1872
|
+
end: number;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
export interface WikiAnchorResolveResult {
|
|
1876
|
+
target_uri: string;
|
|
1877
|
+
state: WikiAnchorResolveState;
|
|
1878
|
+
current?: WikiAnchorResolveRange;
|
|
1879
|
+
origin_quote?: string;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export interface WikiAnchorResolveResponse {
|
|
1883
|
+
head_rev: string;
|
|
1884
|
+
results: WikiAnchorResolveResult[];
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1841
1887
|
export interface WikiRefsCheckResponse {
|
|
1842
1888
|
wiki_id: string;
|
|
1843
1889
|
wiki_slug: string;
|
|
@@ -2385,12 +2431,15 @@ export interface Comment {
|
|
|
2385
2431
|
id: string;
|
|
2386
2432
|
org_id: string;
|
|
2387
2433
|
target_uri: string;
|
|
2434
|
+
target_quote?: string | null;
|
|
2388
2435
|
parent_id?: string | null;
|
|
2389
2436
|
author_id: string;
|
|
2390
2437
|
body: string;
|
|
2391
2438
|
mentions?: Mention[];
|
|
2392
2439
|
hints?: MessageHints | null;
|
|
2393
2440
|
agent_step_id?: string | null;
|
|
2441
|
+
resolved_at?: string | null;
|
|
2442
|
+
resolved_by_id?: string | null;
|
|
2394
2443
|
created_at: string;
|
|
2395
2444
|
updated_at: string;
|
|
2396
2445
|
author?: User;
|
|
@@ -2398,6 +2447,7 @@ export interface Comment {
|
|
|
2398
2447
|
|
|
2399
2448
|
export interface CreateCommentRequest {
|
|
2400
2449
|
target_uri: string;
|
|
2450
|
+
target_quote?: string;
|
|
2401
2451
|
body: string;
|
|
2402
2452
|
parent_id?: string;
|
|
2403
2453
|
}
|
|
@@ -2490,10 +2540,14 @@ export interface ChannelConnection {
|
|
|
2490
2540
|
}
|
|
2491
2541
|
|
|
2492
2542
|
export interface ChannelCredentialsInput {
|
|
2493
|
-
|
|
2494
|
-
|
|
2543
|
+
/** Feishu fields. */
|
|
2544
|
+
app_id?: string;
|
|
2545
|
+
app_secret?: string;
|
|
2495
2546
|
verification_token?: string;
|
|
2496
2547
|
encrypt_key?: string;
|
|
2548
|
+
/** Slack fields (webhook-only: the signing secret is the verifier). */
|
|
2549
|
+
bot_token?: string;
|
|
2550
|
+
signing_secret?: string;
|
|
2497
2551
|
team_id?: string;
|
|
2498
2552
|
}
|
|
2499
2553
|
|
|
@@ -2543,10 +2597,13 @@ export interface ChannelMessage {
|
|
|
2543
2597
|
}
|
|
2544
2598
|
|
|
2545
2599
|
/**
|
|
2546
|
-
*
|
|
2547
|
-
*
|
|
2548
|
-
*
|
|
2549
|
-
*
|
|
2600
|
+
* One-click provisioning session. Provider-specific shape:
|
|
2601
|
+
* - feishu (OAuth device flow): render `verification_url` as a QR code;
|
|
2602
|
+
* each status poll may forward one provider poll server-side, so respect
|
|
2603
|
+
* `poll_interval_seconds`.
|
|
2604
|
+
* - slack (manifest + OAuth install): `verification_url` is the authorize
|
|
2605
|
+
* link to open; status polls are pure state reads (completion is pushed
|
|
2606
|
+
* by the OAuth callback).
|
|
2550
2607
|
*/
|
|
2551
2608
|
export type ChannelProvisioningStatus =
|
|
2552
2609
|
| 'pending'
|
|
@@ -2572,14 +2629,62 @@ export interface ChannelProvisioningSession {
|
|
|
2572
2629
|
expires_at: string;
|
|
2573
2630
|
created_at: string;
|
|
2574
2631
|
updated_at: string;
|
|
2575
|
-
/**
|
|
2632
|
+
/**
|
|
2633
|
+
* Provisioning target — present on live (pending/polling) sessions only.
|
|
2634
|
+
* feishu: the QR-code content; slack: the OAuth authorize link.
|
|
2635
|
+
*/
|
|
2576
2636
|
verification_url?: string;
|
|
2637
|
+
/** feishu only. */
|
|
2577
2638
|
user_code?: string;
|
|
2578
2639
|
}
|
|
2579
2640
|
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2641
|
+
/**
|
|
2642
|
+
* Discriminated on `provider`: slack REQUIRES the config token (the server
|
|
2643
|
+
* 400s without it), other providers have no such field — the union makes a
|
|
2644
|
+
* token-less slack initiate unrepresentable at compile time.
|
|
2645
|
+
*/
|
|
2646
|
+
export type InitiateChannelProvisioningInput =
|
|
2647
|
+
| {
|
|
2648
|
+
agent_id: string;
|
|
2649
|
+
provider: 'slack';
|
|
2650
|
+
/**
|
|
2651
|
+
* The short-lived app-configuration token (12h, generated at
|
|
2652
|
+
* api.slack.com/apps). Transits once into apps.manifest.create and is
|
|
2653
|
+
* never stored.
|
|
2654
|
+
*/
|
|
2655
|
+
config_token: string;
|
|
2656
|
+
}
|
|
2657
|
+
| {
|
|
2658
|
+
agent_id: string;
|
|
2659
|
+
provider: Exclude<ChannelProvider, 'slack'>;
|
|
2660
|
+
};
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* Tier-B platform verb request (agent-only): send as the bound bot.
|
|
2664
|
+
* Deliberately narrowed to 'slack' — the verb surface is per-vendor
|
|
2665
|
+
* (feishu outbound is the lark-cli broker, not this endpoint), so a
|
|
2666
|
+
* generic ChannelProvider here would compile call sites that always 400.
|
|
2667
|
+
*/
|
|
2668
|
+
export interface SendChannelMessageInput {
|
|
2669
|
+
channel_type: 'slack';
|
|
2670
|
+
/** Vendor-native conversation id from the inbound event (e.g. C…/D…). */
|
|
2671
|
+
conversation_id: string;
|
|
2672
|
+
/**
|
|
2673
|
+
* External message id being answered (channel-domain format). REQUIRED
|
|
2674
|
+
* for channel conversations (the reply lands in that message's thread);
|
|
2675
|
+
* optional for DMs (always linear).
|
|
2676
|
+
*/
|
|
2677
|
+
reply_to?: string;
|
|
2678
|
+
text: string;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
export interface SentChannelMessage {
|
|
2682
|
+
channel_type: 'slack';
|
|
2683
|
+
conversation_id: string;
|
|
2684
|
+
/** Channel-domain external id ({channel}:{ts}) — usable as a reply_to. */
|
|
2685
|
+
message_id: string;
|
|
2686
|
+
thread_anchor?: string;
|
|
2687
|
+
sent_at: string;
|
|
2583
2688
|
}
|
|
2584
2689
|
|
|
2585
2690
|
// ============================================================
|
|
@@ -2712,7 +2817,8 @@ export interface SteerDispatchResponse {
|
|
|
2712
2817
|
*/
|
|
2713
2818
|
export type CompleteDispatchRequest =
|
|
2714
2819
|
| CompleteDispatchLaneRequest
|
|
2715
|
-
| CompleteDispatchSourceFormRequest
|
|
2820
|
+
| CompleteDispatchSourceFormRequest
|
|
2821
|
+
| CompleteDispatchByIDRequest;
|
|
2716
2822
|
|
|
2717
2823
|
/** Lane form: no_action sweep + lane release + re-drive. */
|
|
2718
2824
|
export interface CompleteDispatchLaneRequest {
|
|
@@ -2726,6 +2832,7 @@ export interface CompleteDispatchLaneRequest {
|
|
|
2726
2832
|
*/
|
|
2727
2833
|
turn_outcome?: 'ok' | 'error';
|
|
2728
2834
|
sources?: never;
|
|
2835
|
+
dispatch_event_id?: never;
|
|
2729
2836
|
}
|
|
2730
2837
|
|
|
2731
2838
|
/**
|
|
@@ -2740,6 +2847,25 @@ export interface CompleteDispatchSourceFormRequest {
|
|
|
2740
2847
|
lane?: never;
|
|
2741
2848
|
target_uri?: never;
|
|
2742
2849
|
thread_root_id?: never;
|
|
2850
|
+
dispatch_event_id?: never;
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* By-id form: terminal resolution of ONE WorkItem — the typed bridge's turn
|
|
2855
|
+
* close. Exact where the source pair is ambiguous (a task PATCH enqueues
|
|
2856
|
+
* sibling task_assign + task_update rows under one source tuple). `lane`
|
|
2857
|
+
* doubles as the fence token: pass the claimed lane while the row is
|
|
2858
|
+
* lane-owned (a stale/absent token answers 409 STALE_LANE and touches
|
|
2859
|
+
* nothing); omit it to administratively close a pending row (the
|
|
2860
|
+
* wrapper-less buffered-drain path). Idempotent on terminal rows.
|
|
2861
|
+
*/
|
|
2862
|
+
export interface CompleteDispatchByIDRequest {
|
|
2863
|
+
dispatch_event_id: string;
|
|
2864
|
+
lane?: string;
|
|
2865
|
+
turn_outcome?: 'ok' | 'error';
|
|
2866
|
+
sources?: never;
|
|
2867
|
+
target_uri?: never;
|
|
2868
|
+
thread_root_id?: never;
|
|
2743
2869
|
}
|
|
2744
2870
|
|
|
2745
2871
|
/** Lane-form result. */
|
|
@@ -3055,6 +3181,8 @@ export interface ResolvedRef {
|
|
|
3055
3181
|
resolved_rev?: string;
|
|
3056
3182
|
line_start?: number;
|
|
3057
3183
|
line_end?: number;
|
|
3184
|
+
text_start?: number;
|
|
3185
|
+
text_end?: number;
|
|
3058
3186
|
heading_path?: string[];
|
|
3059
3187
|
symbol_name?: string;
|
|
3060
3188
|
|
|
@@ -3871,6 +3999,30 @@ export interface SearchResponse {
|
|
|
3871
3999
|
// Edge Device Types
|
|
3872
4000
|
// ============================================================
|
|
3873
4001
|
|
|
4002
|
+
/**
|
|
4003
|
+
* Where an Edge device runs — and, consequently, who it belongs to.
|
|
4004
|
+
*
|
|
4005
|
+
* - `byoc` — the user's own computer running Parall Clip. Owner-only in every
|
|
4006
|
+
* sense: only the owner connects it, manages it, or executes on it.
|
|
4007
|
+
* - `hosted` — a platform-managed Cloud Profile. The browser login it holds is an
|
|
4008
|
+
* ORG-SHARED credential maintained by its creator. Members and agents
|
|
4009
|
+
* execute against it ONLY through a clip connection its maintainer
|
|
4010
|
+
* bound; there is no implicit route to a hosted device.
|
|
4011
|
+
*/
|
|
4012
|
+
export type EdgePlacement = 'byoc' | 'hosted';
|
|
4013
|
+
|
|
4014
|
+
/**
|
|
4015
|
+
* Lifecycle of a hosted Cloud Profile. Only the states the server can PROVE without
|
|
4016
|
+
* the runtime fence are emitted today; the fence-aware ones (`starting` / `online` /
|
|
4017
|
+
* `busy`) arrive with the controller.
|
|
4018
|
+
*
|
|
4019
|
+
* - `idle` — no pod running (and none requested). Creating a profile starts nothing.
|
|
4020
|
+
* - `deleting` — delete requested; the finalizer (pod drain, S3 state purge) is still
|
|
4021
|
+
* running. Deletion is async and idempotent, so this can persist for
|
|
4022
|
+
* several minutes.
|
|
4023
|
+
*/
|
|
4024
|
+
export type EdgeHostedState = 'idle' | 'deleting';
|
|
4025
|
+
|
|
3874
4026
|
export interface EdgeDevice {
|
|
3875
4027
|
id: string;
|
|
3876
4028
|
org_id: string;
|
|
@@ -3880,6 +4032,23 @@ export interface EdgeDevice {
|
|
|
3880
4032
|
last_seen_at?: string;
|
|
3881
4033
|
created_at: string;
|
|
3882
4034
|
updated_at: string;
|
|
4035
|
+
/** Absent on responses from a pre-D1 server; treat a missing value as 'byoc'. */
|
|
4036
|
+
placement?: EdgePlacement;
|
|
4037
|
+
/** Hosted devices only. */
|
|
4038
|
+
hosted_state?: EdgeHostedState;
|
|
4039
|
+
/**
|
|
4040
|
+
* Whether THIS caller may sign into / rebind / delete this device
|
|
4041
|
+
* (hosted: human maintainer ∨ human org admin; byoc: owner). Server-computed, so a
|
|
4042
|
+
* client can render management affordances without reimplementing the rule and
|
|
4043
|
+
* drifting from it.
|
|
4044
|
+
*/
|
|
4045
|
+
can_manage?: boolean;
|
|
4046
|
+
/**
|
|
4047
|
+
* True for hosted devices: clips bound to it by its maintainer may be run by other
|
|
4048
|
+
* org members and agents. Surface this before anyone signs in — the login being
|
|
4049
|
+
* shared with the whole org is the product contract, not a footnote.
|
|
4050
|
+
*/
|
|
4051
|
+
shared?: boolean;
|
|
3883
4052
|
}
|
|
3884
4053
|
|
|
3885
4054
|
export interface EdgeBrowserProfile {
|
|
@@ -3904,10 +4073,22 @@ export interface ClipConnection {
|
|
|
3904
4073
|
updated_at: string;
|
|
3905
4074
|
}
|
|
3906
4075
|
|
|
4076
|
+
/**
|
|
4077
|
+
* Two INDEPENDENT onboarding journeys. The original fields mean what they always
|
|
4078
|
+
* meant — "has this org set up the desktop journey?" — and hosted-backed state
|
|
4079
|
+
* never counts toward them, so a Cloud Profile cannot make desktop onboarding look
|
|
4080
|
+
* finished and tell the user to skip installing the app they still need. Precisely:
|
|
4081
|
+
* device-backed fields are scoped to live `placement='byoc'` edges;
|
|
4082
|
+
* `connection_created` additionally counts device-less MCP bindings (MCP has no
|
|
4083
|
+
* device and predates hosted). The `hosted_*` fields are the second journey;
|
|
4084
|
+
* neither impersonates the other.
|
|
4085
|
+
*/
|
|
3907
4086
|
export interface EdgeOnboardingStatus {
|
|
3908
4087
|
device_registered: boolean;
|
|
3909
4088
|
device_online: boolean;
|
|
3910
4089
|
clip_installed: boolean;
|
|
3911
4090
|
connection_created: boolean;
|
|
3912
4091
|
profile_created: boolean;
|
|
4092
|
+
hosted_profile_created?: boolean;
|
|
4093
|
+
hosted_connection_created?: boolean;
|
|
3913
4094
|
}
|