@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/dist/types.d.ts
CHANGED
|
@@ -913,6 +913,8 @@ export interface Task {
|
|
|
913
913
|
seq_number: number | null;
|
|
914
914
|
identifier: string | null;
|
|
915
915
|
sort_order: number;
|
|
916
|
+
/** Planned completion date, YYYY-MM-DD (calendar date, timezone-free). */
|
|
917
|
+
due_date: string | null;
|
|
916
918
|
assignee?: User;
|
|
917
919
|
creator?: User;
|
|
918
920
|
created_at: string;
|
|
@@ -990,6 +992,8 @@ export interface CreateTaskRequest {
|
|
|
990
992
|
project_id?: string;
|
|
991
993
|
source_chat_id?: string;
|
|
992
994
|
sort_order?: number;
|
|
995
|
+
/** Planned completion date, YYYY-MM-DD. */
|
|
996
|
+
due_date?: string;
|
|
993
997
|
}
|
|
994
998
|
export interface UpdateTaskRequest {
|
|
995
999
|
title?: string;
|
|
@@ -1000,6 +1004,15 @@ export interface UpdateTaskRequest {
|
|
|
1000
1004
|
parent_id?: string | null;
|
|
1001
1005
|
project_id?: string | null;
|
|
1002
1006
|
sort_order?: number;
|
|
1007
|
+
/**
|
|
1008
|
+
* Ordering intent resolved server-side in the update transaction:
|
|
1009
|
+
* 'end' appends the task to its (possibly new) status column. Preferred
|
|
1010
|
+
* over computing sort_order from client caches, which may not hold the
|
|
1011
|
+
* full column. Mutually exclusive with sort_order.
|
|
1012
|
+
*/
|
|
1013
|
+
placement?: 'end';
|
|
1014
|
+
/** Planned completion date, YYYY-MM-DD; explicit null clears it. */
|
|
1015
|
+
due_date?: string | null;
|
|
1003
1016
|
/**
|
|
1004
1017
|
* Dispatch lane binding (agent senders during a typed dispatch turn).
|
|
1005
1018
|
* dispatch_lane + dispatch_event_id bind the update to the claimed typed
|
|
@@ -1050,6 +1063,13 @@ export interface UpdateProjectRequest {
|
|
|
1050
1063
|
export type ScheduleSpecType = 'cron' | 'interval' | 'one_shot';
|
|
1051
1064
|
export type ScheduleStatus = 'active' | 'paused' | 'completed' | 'cancelled';
|
|
1052
1065
|
export type ScheduleCancelReason = 'user_cancel' | 'attached_gone' | 'creator_ineligible';
|
|
1066
|
+
/**
|
|
1067
|
+
* Why a schedule sits in its current non-active state. Cancel reasons appear
|
|
1068
|
+
* only on `cancelled` rows; `attendee_unreachable` appears only on `paused`
|
|
1069
|
+
* rows (stamped by the scheduler when every attendee is an agent on a
|
|
1070
|
+
* terminated machine; cleared on resume — a user pause keeps null).
|
|
1071
|
+
*/
|
|
1072
|
+
export type ScheduleStatusReason = ScheduleCancelReason | 'attendee_unreachable';
|
|
1053
1073
|
export type ScheduleRunStatus = 'delivered' | 'missed' | 'failed';
|
|
1054
1074
|
export interface Schedule {
|
|
1055
1075
|
id: string;
|
|
@@ -1072,7 +1092,10 @@ export interface Schedule {
|
|
|
1072
1092
|
duration_seconds: number | null;
|
|
1073
1093
|
target_ids: string[];
|
|
1074
1094
|
status: ScheduleStatus;
|
|
1075
|
-
|
|
1095
|
+
/** Optional during the rename rollout: pre-135 servers emit only `cancel_reason`. Read via `status_reason ?? cancel_reason`. */
|
|
1096
|
+
status_reason?: ScheduleStatusReason | null;
|
|
1097
|
+
/** @deprecated Rename-rollout alias of `status_reason`, emitted on cancelled rows only (never carries pause reasons); read `status_reason ?? cancel_reason`. */
|
|
1098
|
+
cancel_reason?: ScheduleCancelReason | null;
|
|
1076
1099
|
next_fire_at: string | null;
|
|
1077
1100
|
last_fire_at: string | null;
|
|
1078
1101
|
run_count: number;
|
|
@@ -1497,6 +1520,24 @@ export interface WikiAnchorStatus {
|
|
|
1497
1520
|
export interface WikiAnchorStatusResponse {
|
|
1498
1521
|
results: WikiAnchorStatus[];
|
|
1499
1522
|
}
|
|
1523
|
+
export interface WikiAnchorResolveRequest {
|
|
1524
|
+
targets: string[];
|
|
1525
|
+
}
|
|
1526
|
+
export type WikiAnchorResolveState = 'attached' | 'detached' | 'file_missing' | 'unknown';
|
|
1527
|
+
export interface WikiAnchorResolveRange {
|
|
1528
|
+
start: number;
|
|
1529
|
+
end: number;
|
|
1530
|
+
}
|
|
1531
|
+
export interface WikiAnchorResolveResult {
|
|
1532
|
+
target_uri: string;
|
|
1533
|
+
state: WikiAnchorResolveState;
|
|
1534
|
+
current?: WikiAnchorResolveRange;
|
|
1535
|
+
origin_quote?: string;
|
|
1536
|
+
}
|
|
1537
|
+
export interface WikiAnchorResolveResponse {
|
|
1538
|
+
head_rev: string;
|
|
1539
|
+
results: WikiAnchorResolveResult[];
|
|
1540
|
+
}
|
|
1500
1541
|
export interface WikiRefsCheckResponse {
|
|
1501
1542
|
wiki_id: string;
|
|
1502
1543
|
wiki_slug: string;
|
|
@@ -1925,18 +1966,22 @@ export interface Comment {
|
|
|
1925
1966
|
id: string;
|
|
1926
1967
|
org_id: string;
|
|
1927
1968
|
target_uri: string;
|
|
1969
|
+
target_quote?: string | null;
|
|
1928
1970
|
parent_id?: string | null;
|
|
1929
1971
|
author_id: string;
|
|
1930
1972
|
body: string;
|
|
1931
1973
|
mentions?: Mention[];
|
|
1932
1974
|
hints?: MessageHints | null;
|
|
1933
1975
|
agent_step_id?: string | null;
|
|
1976
|
+
resolved_at?: string | null;
|
|
1977
|
+
resolved_by_id?: string | null;
|
|
1934
1978
|
created_at: string;
|
|
1935
1979
|
updated_at: string;
|
|
1936
1980
|
author?: User;
|
|
1937
1981
|
}
|
|
1938
1982
|
export interface CreateCommentRequest {
|
|
1939
1983
|
target_uri: string;
|
|
1984
|
+
target_quote?: string;
|
|
1940
1985
|
body: string;
|
|
1941
1986
|
parent_id?: string;
|
|
1942
1987
|
}
|
|
@@ -2005,10 +2050,14 @@ export interface ChannelConnection {
|
|
|
2005
2050
|
updated_at: string;
|
|
2006
2051
|
}
|
|
2007
2052
|
export interface ChannelCredentialsInput {
|
|
2008
|
-
|
|
2009
|
-
|
|
2053
|
+
/** Feishu fields. */
|
|
2054
|
+
app_id?: string;
|
|
2055
|
+
app_secret?: string;
|
|
2010
2056
|
verification_token?: string;
|
|
2011
2057
|
encrypt_key?: string;
|
|
2058
|
+
/** Slack fields (webhook-only: the signing secret is the verifier). */
|
|
2059
|
+
bot_token?: string;
|
|
2060
|
+
signing_secret?: string;
|
|
2012
2061
|
team_id?: string;
|
|
2013
2062
|
}
|
|
2014
2063
|
export interface CreateChannelConnectionInput {
|
|
@@ -2053,10 +2102,13 @@ export interface ChannelMessage {
|
|
|
2053
2102
|
created_at: string;
|
|
2054
2103
|
}
|
|
2055
2104
|
/**
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
2058
|
-
*
|
|
2059
|
-
*
|
|
2105
|
+
* One-click provisioning session. Provider-specific shape:
|
|
2106
|
+
* - feishu (OAuth device flow): render `verification_url` as a QR code;
|
|
2107
|
+
* each status poll may forward one provider poll server-side, so respect
|
|
2108
|
+
* `poll_interval_seconds`.
|
|
2109
|
+
* - slack (manifest + OAuth install): `verification_url` is the authorize
|
|
2110
|
+
* link to open; status polls are pure state reads (completion is pushed
|
|
2111
|
+
* by the OAuth callback).
|
|
2060
2112
|
*/
|
|
2061
2113
|
export type ChannelProvisioningStatus = 'pending' | 'polling' | 'done' | 'expired' | 'denied' | 'canceled' | 'failed';
|
|
2062
2114
|
export interface ChannelProvisioningSession {
|
|
@@ -2074,13 +2126,57 @@ export interface ChannelProvisioningSession {
|
|
|
2074
2126
|
expires_at: string;
|
|
2075
2127
|
created_at: string;
|
|
2076
2128
|
updated_at: string;
|
|
2077
|
-
/**
|
|
2129
|
+
/**
|
|
2130
|
+
* Provisioning target — present on live (pending/polling) sessions only.
|
|
2131
|
+
* feishu: the QR-code content; slack: the OAuth authorize link.
|
|
2132
|
+
*/
|
|
2078
2133
|
verification_url?: string;
|
|
2134
|
+
/** feishu only. */
|
|
2079
2135
|
user_code?: string;
|
|
2080
2136
|
}
|
|
2081
|
-
|
|
2137
|
+
/**
|
|
2138
|
+
* Discriminated on `provider`: slack REQUIRES the config token (the server
|
|
2139
|
+
* 400s without it), other providers have no such field — the union makes a
|
|
2140
|
+
* token-less slack initiate unrepresentable at compile time.
|
|
2141
|
+
*/
|
|
2142
|
+
export type InitiateChannelProvisioningInput = {
|
|
2082
2143
|
agent_id: string;
|
|
2083
|
-
provider:
|
|
2144
|
+
provider: 'slack';
|
|
2145
|
+
/**
|
|
2146
|
+
* The short-lived app-configuration token (12h, generated at
|
|
2147
|
+
* api.slack.com/apps). Transits once into apps.manifest.create and is
|
|
2148
|
+
* never stored.
|
|
2149
|
+
*/
|
|
2150
|
+
config_token: string;
|
|
2151
|
+
} | {
|
|
2152
|
+
agent_id: string;
|
|
2153
|
+
provider: Exclude<ChannelProvider, 'slack'>;
|
|
2154
|
+
};
|
|
2155
|
+
/**
|
|
2156
|
+
* Tier-B platform verb request (agent-only): send as the bound bot.
|
|
2157
|
+
* Deliberately narrowed to 'slack' — the verb surface is per-vendor
|
|
2158
|
+
* (feishu outbound is the lark-cli broker, not this endpoint), so a
|
|
2159
|
+
* generic ChannelProvider here would compile call sites that always 400.
|
|
2160
|
+
*/
|
|
2161
|
+
export interface SendChannelMessageInput {
|
|
2162
|
+
channel_type: 'slack';
|
|
2163
|
+
/** Vendor-native conversation id from the inbound event (e.g. C…/D…). */
|
|
2164
|
+
conversation_id: string;
|
|
2165
|
+
/**
|
|
2166
|
+
* External message id being answered (channel-domain format). REQUIRED
|
|
2167
|
+
* for channel conversations (the reply lands in that message's thread);
|
|
2168
|
+
* optional for DMs (always linear).
|
|
2169
|
+
*/
|
|
2170
|
+
reply_to?: string;
|
|
2171
|
+
text: string;
|
|
2172
|
+
}
|
|
2173
|
+
export interface SentChannelMessage {
|
|
2174
|
+
channel_type: 'slack';
|
|
2175
|
+
conversation_id: string;
|
|
2176
|
+
/** Channel-domain external id ({channel}:{ts}) — usable as a reply_to. */
|
|
2177
|
+
message_id: string;
|
|
2178
|
+
thread_anchor?: string;
|
|
2179
|
+
sent_at: string;
|
|
2084
2180
|
}
|
|
2085
2181
|
export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'external_trigger' | 'approval_decided' | 'channel_message';
|
|
2086
2182
|
export type DispatchStatus = 'pending' | 'received' | 'acked';
|
|
@@ -2185,7 +2281,7 @@ export interface SteerDispatchResponse {
|
|
|
2185
2281
|
* forms (dispatch-convergence-design.md §3), each with its own result shape
|
|
2186
2282
|
* (the `completeDispatch` client method overloads on them).
|
|
2187
2283
|
*/
|
|
2188
|
-
export type CompleteDispatchRequest = CompleteDispatchLaneRequest | CompleteDispatchSourceFormRequest;
|
|
2284
|
+
export type CompleteDispatchRequest = CompleteDispatchLaneRequest | CompleteDispatchSourceFormRequest | CompleteDispatchByIDRequest;
|
|
2189
2285
|
/** Lane form: no_action sweep + lane release + re-drive. */
|
|
2190
2286
|
export interface CompleteDispatchLaneRequest {
|
|
2191
2287
|
lane: string;
|
|
@@ -2198,6 +2294,7 @@ export interface CompleteDispatchLaneRequest {
|
|
|
2198
2294
|
*/
|
|
2199
2295
|
turn_outcome?: 'ok' | 'error';
|
|
2200
2296
|
sources?: never;
|
|
2297
|
+
dispatch_event_id?: never;
|
|
2201
2298
|
}
|
|
2202
2299
|
/**
|
|
2203
2300
|
* Source form: the lane-less close for runtimes without a resident process —
|
|
@@ -2211,6 +2308,24 @@ export interface CompleteDispatchSourceFormRequest {
|
|
|
2211
2308
|
lane?: never;
|
|
2212
2309
|
target_uri?: never;
|
|
2213
2310
|
thread_root_id?: never;
|
|
2311
|
+
dispatch_event_id?: never;
|
|
2312
|
+
}
|
|
2313
|
+
/**
|
|
2314
|
+
* By-id form: terminal resolution of ONE WorkItem — the typed bridge's turn
|
|
2315
|
+
* close. Exact where the source pair is ambiguous (a task PATCH enqueues
|
|
2316
|
+
* sibling task_assign + task_update rows under one source tuple). `lane`
|
|
2317
|
+
* doubles as the fence token: pass the claimed lane while the row is
|
|
2318
|
+
* lane-owned (a stale/absent token answers 409 STALE_LANE and touches
|
|
2319
|
+
* nothing); omit it to administratively close a pending row (the
|
|
2320
|
+
* wrapper-less buffered-drain path). Idempotent on terminal rows.
|
|
2321
|
+
*/
|
|
2322
|
+
export interface CompleteDispatchByIDRequest {
|
|
2323
|
+
dispatch_event_id: string;
|
|
2324
|
+
lane?: string;
|
|
2325
|
+
turn_outcome?: 'ok' | 'error';
|
|
2326
|
+
sources?: never;
|
|
2327
|
+
target_uri?: never;
|
|
2328
|
+
thread_root_id?: never;
|
|
2214
2329
|
}
|
|
2215
2330
|
/** Lane-form result. */
|
|
2216
2331
|
export interface CompleteDispatchResult {
|
|
@@ -2482,6 +2597,8 @@ export interface ResolvedRef {
|
|
|
2482
2597
|
resolved_rev?: string;
|
|
2483
2598
|
line_start?: number;
|
|
2484
2599
|
line_end?: number;
|
|
2600
|
+
text_start?: number;
|
|
2601
|
+
text_end?: number;
|
|
2485
2602
|
heading_path?: string[];
|
|
2486
2603
|
symbol_name?: string;
|
|
2487
2604
|
comment_author?: string;
|
|
@@ -3171,6 +3288,28 @@ export interface SearchResponse {
|
|
|
3171
3288
|
comments?: boolean;
|
|
3172
3289
|
};
|
|
3173
3290
|
}
|
|
3291
|
+
/**
|
|
3292
|
+
* Where an Edge device runs — and, consequently, who it belongs to.
|
|
3293
|
+
*
|
|
3294
|
+
* - `byoc` — the user's own computer running Parall Clip. Owner-only in every
|
|
3295
|
+
* sense: only the owner connects it, manages it, or executes on it.
|
|
3296
|
+
* - `hosted` — a platform-managed Cloud Profile. The browser login it holds is an
|
|
3297
|
+
* ORG-SHARED credential maintained by its creator. Members and agents
|
|
3298
|
+
* execute against it ONLY through a clip connection its maintainer
|
|
3299
|
+
* bound; there is no implicit route to a hosted device.
|
|
3300
|
+
*/
|
|
3301
|
+
export type EdgePlacement = 'byoc' | 'hosted';
|
|
3302
|
+
/**
|
|
3303
|
+
* Lifecycle of a hosted Cloud Profile. Only the states the server can PROVE without
|
|
3304
|
+
* the runtime fence are emitted today; the fence-aware ones (`starting` / `online` /
|
|
3305
|
+
* `busy`) arrive with the controller.
|
|
3306
|
+
*
|
|
3307
|
+
* - `idle` — no pod running (and none requested). Creating a profile starts nothing.
|
|
3308
|
+
* - `deleting` — delete requested; the finalizer (pod drain, S3 state purge) is still
|
|
3309
|
+
* running. Deletion is async and idempotent, so this can persist for
|
|
3310
|
+
* several minutes.
|
|
3311
|
+
*/
|
|
3312
|
+
export type EdgeHostedState = 'idle' | 'deleting';
|
|
3174
3313
|
export interface EdgeDevice {
|
|
3175
3314
|
id: string;
|
|
3176
3315
|
org_id: string;
|
|
@@ -3180,6 +3319,23 @@ export interface EdgeDevice {
|
|
|
3180
3319
|
last_seen_at?: string;
|
|
3181
3320
|
created_at: string;
|
|
3182
3321
|
updated_at: string;
|
|
3322
|
+
/** Absent on responses from a pre-D1 server; treat a missing value as 'byoc'. */
|
|
3323
|
+
placement?: EdgePlacement;
|
|
3324
|
+
/** Hosted devices only. */
|
|
3325
|
+
hosted_state?: EdgeHostedState;
|
|
3326
|
+
/**
|
|
3327
|
+
* Whether THIS caller may sign into / rebind / delete this device
|
|
3328
|
+
* (hosted: human maintainer ∨ human org admin; byoc: owner). Server-computed, so a
|
|
3329
|
+
* client can render management affordances without reimplementing the rule and
|
|
3330
|
+
* drifting from it.
|
|
3331
|
+
*/
|
|
3332
|
+
can_manage?: boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* True for hosted devices: clips bound to it by its maintainer may be run by other
|
|
3335
|
+
* org members and agents. Surface this before anyone signs in — the login being
|
|
3336
|
+
* shared with the whole org is the product contract, not a footnote.
|
|
3337
|
+
*/
|
|
3338
|
+
shared?: boolean;
|
|
3183
3339
|
}
|
|
3184
3340
|
export interface EdgeBrowserProfile {
|
|
3185
3341
|
id: string;
|
|
@@ -3201,12 +3357,24 @@ export interface ClipConnection {
|
|
|
3201
3357
|
created_at: string;
|
|
3202
3358
|
updated_at: string;
|
|
3203
3359
|
}
|
|
3360
|
+
/**
|
|
3361
|
+
* Two INDEPENDENT onboarding journeys. The original fields mean what they always
|
|
3362
|
+
* meant — "has this org set up the desktop journey?" — and hosted-backed state
|
|
3363
|
+
* never counts toward them, so a Cloud Profile cannot make desktop onboarding look
|
|
3364
|
+
* finished and tell the user to skip installing the app they still need. Precisely:
|
|
3365
|
+
* device-backed fields are scoped to live `placement='byoc'` edges;
|
|
3366
|
+
* `connection_created` additionally counts device-less MCP bindings (MCP has no
|
|
3367
|
+
* device and predates hosted). The `hosted_*` fields are the second journey;
|
|
3368
|
+
* neither impersonates the other.
|
|
3369
|
+
*/
|
|
3204
3370
|
export interface EdgeOnboardingStatus {
|
|
3205
3371
|
device_registered: boolean;
|
|
3206
3372
|
device_online: boolean;
|
|
3207
3373
|
clip_installed: boolean;
|
|
3208
3374
|
connection_created: boolean;
|
|
3209
3375
|
profile_created: boolean;
|
|
3376
|
+
hosted_profile_created?: boolean;
|
|
3377
|
+
hosted_connection_created?: boolean;
|
|
3210
3378
|
}
|
|
3211
3379
|
export {};
|
|
3212
3380
|
//# sourceMappingURL=types.d.ts.map
|