@parall/sdk 1.47.0 → 1.48.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 +59 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +99 -2
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -0
- package/dist/types.d.ts +102 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/client.ts +116 -2
- package/src/constants.ts +9 -0
- package/src/types.ts +113 -0
package/src/types.ts
CHANGED
|
@@ -2497,6 +2497,14 @@ export interface InboxItem {
|
|
|
2497
2497
|
grouping_priority: number;
|
|
2498
2498
|
/** Number of events in this group. Populated by the grouped list query. */
|
|
2499
2499
|
group_count: number;
|
|
2500
|
+
/**
|
|
2501
|
+
* True when ANY row in this item's group is unread — the same group-level
|
|
2502
|
+
* definition the unread-count badge uses. The representative row's own
|
|
2503
|
+
* `read_at` can be set while older rows in its group are still unread, so
|
|
2504
|
+
* read-state display must key off this field. Optional: absent on locally
|
|
2505
|
+
* cached rows written before the field shipped (fall back to `read_at`).
|
|
2506
|
+
*/
|
|
2507
|
+
group_unread?: boolean;
|
|
2500
2508
|
read_at: string | null;
|
|
2501
2509
|
archived_at: string | null;
|
|
2502
2510
|
snoozed_until: string | null;
|
|
@@ -4135,6 +4143,15 @@ export type EdgePlacement = 'byoc' | 'hosted';
|
|
|
4135
4143
|
*/
|
|
4136
4144
|
export type EdgeHostedState = 'idle' | 'deleting';
|
|
4137
4145
|
|
|
4146
|
+
/** Stable API error codes returned by the BYOC unregister contract. */
|
|
4147
|
+
export type EdgeDeviceUnregisterErrorCode =
|
|
4148
|
+
| 'JWT_REQUIRED'
|
|
4149
|
+
| 'HUMAN_REQUIRED'
|
|
4150
|
+
| 'FORBIDDEN'
|
|
4151
|
+
| 'EDGE_PLACEMENT_UNSUPPORTED'
|
|
4152
|
+
| 'EDGE_ONLINE'
|
|
4153
|
+
| 'EDGE_INTEGRITY_ERROR';
|
|
4154
|
+
|
|
4138
4155
|
export interface EdgeDevice {
|
|
4139
4156
|
id: string;
|
|
4140
4157
|
org_id: string;
|
|
@@ -4185,6 +4202,102 @@ export interface ClipConnection {
|
|
|
4185
4202
|
updated_at: string;
|
|
4186
4203
|
}
|
|
4187
4204
|
|
|
4205
|
+
/**
|
|
4206
|
+
* A clip in the api-server org registry (`crg_…`, table `clip_registry`) — the
|
|
4207
|
+
* v3 registry that install and clip connections operate on. Distinct from
|
|
4208
|
+
* {@link RegistryClipInfo}, which is the clip-service → Pinix Hub catalog proxy
|
|
4209
|
+
* and carries no registry id.
|
|
4210
|
+
*/
|
|
4211
|
+
export interface ClipRegistryEntry {
|
|
4212
|
+
id: string;
|
|
4213
|
+
org_id: string;
|
|
4214
|
+
name: string;
|
|
4215
|
+
description?: string;
|
|
4216
|
+
visibility: 'public' | 'private';
|
|
4217
|
+
version?: string;
|
|
4218
|
+
/** clip.json manifest. `type` absent/null means browser (predates the field). */
|
|
4219
|
+
manifest: Record<string, unknown> | null;
|
|
4220
|
+
author_id: string;
|
|
4221
|
+
/** Reviewed snapshot served cross-org. Absent = never approved. */
|
|
4222
|
+
approved_version_id?: string;
|
|
4223
|
+
created_at: string;
|
|
4224
|
+
updated_at: string;
|
|
4225
|
+
/** Author-org-only computed fields (state of the latest submitted version). */
|
|
4226
|
+
review_status?: string;
|
|
4227
|
+
review_note?: string;
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
export interface InstallRegistryClipResponse {
|
|
4231
|
+
ok: boolean;
|
|
4232
|
+
clip_id: string;
|
|
4233
|
+
name: string;
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
/**
|
|
4237
|
+
* Execute a registry (Edge) clip command on an Edge device
|
|
4238
|
+
* (`POST /orgs/{orgId}/edge/exec`).
|
|
4239
|
+
*
|
|
4240
|
+
* Routing is EXPLICIT — exactly one of:
|
|
4241
|
+
* - `connection`: a clip connection id (`ccn_…`) or its org-local alias. The
|
|
4242
|
+
* ONLY route to a hosted (Cloud Profile) device: the connection its
|
|
4243
|
+
* maintainer bound IS the org-wide authorization. Also valid for BYOC.
|
|
4244
|
+
* - `edge_id`: a BYOC desktop device the CALLER owns. Naming a hosted device
|
|
4245
|
+
* here is refused (`400 HOSTED_CONNECTION_REQUIRED`).
|
|
4246
|
+
* - neither: legacy BYOC fallback — resolves only to the caller's OWN online
|
|
4247
|
+
* desktop device, never to a hosted one.
|
|
4248
|
+
*/
|
|
4249
|
+
export interface ExecEdgeClipRequest {
|
|
4250
|
+
/**
|
|
4251
|
+
* Clip name in the org's clip registry (or an installed marketplace clip).
|
|
4252
|
+
* Exactly ONE of `clip` or `clip_id` is required — same identity contract as
|
|
4253
|
+
* clip invoke: bare names keep the fail-closed collision behavior (own-org
|
|
4254
|
+
* shadows installs; two installed namesakes → `409 CLIP_NAME_AMBIGUOUS`).
|
|
4255
|
+
*/
|
|
4256
|
+
clip?: string;
|
|
4257
|
+
/**
|
|
4258
|
+
* Exact registry Clip id (`crg_…`). Selects the exact object without
|
|
4259
|
+
* weakening execution trust (cross-org still requires public + approved +
|
|
4260
|
+
* installed and runs only the approved snapshot).
|
|
4261
|
+
*/
|
|
4262
|
+
clip_id?: string;
|
|
4263
|
+
/** Command to run — resolves to `<command>.js` in the clip's files. */
|
|
4264
|
+
command: string;
|
|
4265
|
+
/** Command arguments, forwarded verbatim to the clip. */
|
|
4266
|
+
args?: unknown;
|
|
4267
|
+
/** Connection id (`ccn_…`) or alias. Required for hosted devices. */
|
|
4268
|
+
connection?: string;
|
|
4269
|
+
/** Owned BYOC device id. Mutually exclusive with `connection`. */
|
|
4270
|
+
edge_id?: string;
|
|
4271
|
+
/**
|
|
4272
|
+
* Browser profile name. With `connection` it may only restate the profile
|
|
4273
|
+
* that connection grants (`400 CONNECTION_PROFILE_MISMATCH` otherwise).
|
|
4274
|
+
*/
|
|
4275
|
+
profile?: string;
|
|
4276
|
+
/** Execution timeout in MILLISECONDS (default 30000, max 120000). */
|
|
4277
|
+
timeout?: number;
|
|
4278
|
+
/**
|
|
4279
|
+
* Optional audit tag (≤128 chars). Keep the SAME id across an
|
|
4280
|
+
* EDGE_ACTIVATING retry loop so the server's audit log reads the retries as
|
|
4281
|
+
* one logical call. It is NOT an idempotency key — it deduplicates nothing.
|
|
4282
|
+
*/
|
|
4283
|
+
correlation_id?: string;
|
|
4284
|
+
}
|
|
4285
|
+
|
|
4286
|
+
/**
|
|
4287
|
+
* A completed execution's result envelope (HTTP 200). Every non-success is
|
|
4288
|
+
* thrown as a typed {@link ApiError} instead — see
|
|
4289
|
+
* {@link ParallClient.execEdgeClip} for the full code table and, critically,
|
|
4290
|
+
* which codes are safe to retry.
|
|
4291
|
+
*/
|
|
4292
|
+
export interface EdgeClipExecResult {
|
|
4293
|
+
request_id: string;
|
|
4294
|
+
success: boolean;
|
|
4295
|
+
data?: unknown;
|
|
4296
|
+
error?: string;
|
|
4297
|
+
error_code?: string;
|
|
4298
|
+
duration_ms: number;
|
|
4299
|
+
}
|
|
4300
|
+
|
|
4188
4301
|
/**
|
|
4189
4302
|
* Two INDEPENDENT onboarding journeys. The original fields mean what they always
|
|
4190
4303
|
* meant — "has this org set up the desktop journey?" — and hosted-backed state
|