@deliverd/sdk 0.26.0 → 0.28.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/README.md +81 -0
- package/dist/context.d.ts +46 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +123 -0
- package/dist/data-screen.d.ts.map +1 -1
- package/dist/data-screen.js +6 -0
- package/dist/decision-token.d.ts +102 -0
- package/dist/decision-token.d.ts.map +1 -0
- package/dist/decision-token.js +139 -0
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +15 -0
- package/dist/gates.d.ts +2 -0
- package/dist/gates.d.ts.map +1 -1
- package/dist/gates.js +3 -0
- package/dist/http.d.ts +2 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +3 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +4 -0
- package/dist/released.d.ts +1 -1
- package/dist/released.d.ts.map +1 -1
- package/dist/released.js +3963 -0
- package/dist/types.d.ts +381 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/context.ts +161 -0
- package/src/data-screen.ts +3 -0
- package/src/decision-token.ts +184 -0
- package/src/dev.ts +18 -0
- package/src/gates.ts +3 -0
- package/src/http.ts +4 -1
- package/src/index.ts +25 -0
- package/src/messages.ts +4 -0
- package/src/released.ts +3965 -0
- package/src/types.ts +357 -1
package/dist/types.d.ts
CHANGED
|
@@ -227,6 +227,12 @@ export interface GateData {
|
|
|
227
227
|
description: string | null;
|
|
228
228
|
requestedBy: string;
|
|
229
229
|
createdAt: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* The yes, signed, while `canExecute` is true and the deployment signs:
|
|
232
|
+
* pass it to the code that performs the action, which checks it with
|
|
233
|
+
* `deliverd.decisionTokens.verify` before it acts. Null otherwise.
|
|
234
|
+
*/
|
|
235
|
+
decisionToken?: string | null;
|
|
230
236
|
/** Returned once, by the call that made the gate and named a callbackUrl. */
|
|
231
237
|
callbackSecret?: string;
|
|
232
238
|
/** On a single read: what has been reported against it. */
|
|
@@ -250,6 +256,8 @@ export interface GateDecision {
|
|
|
250
256
|
changes: FieldChange[];
|
|
251
257
|
id: string;
|
|
252
258
|
approvalUrl: string | null;
|
|
259
|
+
/** The signed yes, for the code that performs the action to verify. Null unless it may be acted on now. */
|
|
260
|
+
decisionToken: string | null;
|
|
253
261
|
gate: unknown;
|
|
254
262
|
}
|
|
255
263
|
/** One field an approver corrected before approving. */
|
|
@@ -275,6 +283,24 @@ export interface ApprovalQuestion {
|
|
|
275
283
|
askedAt: string;
|
|
276
284
|
answeredAt: string | null;
|
|
277
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Which agent is asking, as you describe it on a request. Every field is
|
|
288
|
+
* optional; name the ones you know.
|
|
289
|
+
*/
|
|
290
|
+
export interface RequestAgent {
|
|
291
|
+
/** What the agent is called, as people know it. */
|
|
292
|
+
name?: string;
|
|
293
|
+
/** Who makes or runs it: anthropic, openai, cursor, your own company. */
|
|
294
|
+
provider?: string;
|
|
295
|
+
/** Your own id for this agent. */
|
|
296
|
+
externalId?: string;
|
|
297
|
+
}
|
|
298
|
+
/** The agent a request declared, as the API returns it. */
|
|
299
|
+
export interface DeclaredAgent {
|
|
300
|
+
name: string | null;
|
|
301
|
+
provider: string | null;
|
|
302
|
+
externalId: string | null;
|
|
303
|
+
}
|
|
278
304
|
export interface ApprovalData {
|
|
279
305
|
id: string;
|
|
280
306
|
status: ApprovalStatus;
|
|
@@ -325,6 +351,10 @@ export interface ApprovalData {
|
|
|
325
351
|
note: string | null;
|
|
326
352
|
expiresAt: string | null;
|
|
327
353
|
questions: ApprovalQuestion[];
|
|
354
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
355
|
+
agent: DeclaredAgent | null;
|
|
356
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
357
|
+
model: string | null;
|
|
328
358
|
createdAt: string;
|
|
329
359
|
}
|
|
330
360
|
export interface CreateApprovalInput {
|
|
@@ -363,6 +393,14 @@ export interface CreateApprovalInput {
|
|
|
363
393
|
* siblings set this for you.
|
|
364
394
|
*/
|
|
365
395
|
flowId?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
398
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
399
|
+
* and shown as declared — nothing is decided on it.
|
|
400
|
+
*/
|
|
401
|
+
agent?: RequestAgent;
|
|
402
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
403
|
+
model?: string;
|
|
366
404
|
/**
|
|
367
405
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
368
406
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -695,7 +733,11 @@ export type WebhookEventName = "report.published" | "report.updated" | "report.s
|
|
|
695
733
|
| "task.completed"
|
|
696
734
|
/** Opt-in: a task moved into blocked, or a side task finished and its
|
|
697
735
|
* result waits to be applied, kept or discarded. */
|
|
698
|
-
| "task.blocked" | "side_task.completed"
|
|
736
|
+
| "task.blocked" | "side_task.completed"
|
|
737
|
+
/** An AI risk indicator went red for a month: its figure, limits and owner. */
|
|
738
|
+
| "risk_indicator.breached"
|
|
739
|
+
/** Opt-in: one audit log entry, with its chain position and hashes. For a SIEM. */
|
|
740
|
+
| "audit.event";
|
|
699
741
|
export interface WebhookEvent {
|
|
700
742
|
event: WebhookEventName;
|
|
701
743
|
sentAt: string;
|
|
@@ -816,6 +858,14 @@ export interface CreateReviewInput {
|
|
|
816
858
|
* siblings set this for you.
|
|
817
859
|
*/
|
|
818
860
|
flowId?: string;
|
|
861
|
+
/**
|
|
862
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
863
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
864
|
+
* and shown as declared — nothing is decided on it.
|
|
865
|
+
*/
|
|
866
|
+
agent?: RequestAgent;
|
|
867
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
868
|
+
model?: string;
|
|
819
869
|
/**
|
|
820
870
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
821
871
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -855,6 +905,10 @@ export interface ReviewData {
|
|
|
855
905
|
threadCount: number;
|
|
856
906
|
settledAt: string | null;
|
|
857
907
|
expiresAt: string | null;
|
|
908
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
909
|
+
agent: DeclaredAgent | null;
|
|
910
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
911
|
+
model: string | null;
|
|
858
912
|
createdAt: string;
|
|
859
913
|
}
|
|
860
914
|
/** The answer, flattened — what `review()` hands back. */
|
|
@@ -920,6 +974,14 @@ export interface CreateCollectionInput {
|
|
|
920
974
|
* siblings set this for you.
|
|
921
975
|
*/
|
|
922
976
|
flowId?: string;
|
|
977
|
+
/**
|
|
978
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
979
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
980
|
+
* and shown as declared — nothing is decided on it.
|
|
981
|
+
*/
|
|
982
|
+
agent?: RequestAgent;
|
|
983
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
984
|
+
model?: string;
|
|
923
985
|
/**
|
|
924
986
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
925
987
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -967,6 +1029,10 @@ export interface CollectionData {
|
|
|
967
1029
|
settledAt: string | null;
|
|
968
1030
|
dueAt: string | null;
|
|
969
1031
|
expiresAt: string | null;
|
|
1032
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
1033
|
+
agent: DeclaredAgent | null;
|
|
1034
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
1035
|
+
model: string | null;
|
|
970
1036
|
createdAt: string;
|
|
971
1037
|
}
|
|
972
1038
|
/** The answers, flattened — what `collect()` hands back. */
|
|
@@ -1272,9 +1338,41 @@ export interface TaskContext {
|
|
|
1272
1338
|
* `reports.update()` rather than publishing a second on the same thing.
|
|
1273
1339
|
*/
|
|
1274
1340
|
reports: TaskContextReport[];
|
|
1341
|
+
/**
|
|
1342
|
+
* Confirmed knowledge for this task, few and cut short: what its playbook
|
|
1343
|
+
* and step name first, then the most relevant. A person confirmed each one;
|
|
1344
|
+
* propose anything new with `knowledge.propose()`.
|
|
1345
|
+
*/
|
|
1346
|
+
knowledge: TaskContextKnowledge[];
|
|
1347
|
+
/** The playbook this run follows, and this task's step in it; null when none. */
|
|
1348
|
+
playbook: TaskContextPlaybook | null;
|
|
1275
1349
|
/** One paragraph to say back to yourself to re-anchor on the objective. */
|
|
1276
1350
|
reanchor: string;
|
|
1277
1351
|
}
|
|
1352
|
+
/** A confirmed knowledge entry, as a task's context gives it. */
|
|
1353
|
+
export interface TaskContextKnowledge {
|
|
1354
|
+
id: string;
|
|
1355
|
+
kind: KnowledgeKind;
|
|
1356
|
+
title: string;
|
|
1357
|
+
/** Cut at 600 characters; `knowledge.get(id)` has the rest. */
|
|
1358
|
+
body: string;
|
|
1359
|
+
confirmedBy: string | null;
|
|
1360
|
+
url: string;
|
|
1361
|
+
}
|
|
1362
|
+
/** The playbook a task follows, and its step. */
|
|
1363
|
+
export interface TaskContextPlaybook {
|
|
1364
|
+
id: string;
|
|
1365
|
+
title: string;
|
|
1366
|
+
version: number;
|
|
1367
|
+
/** The step this task is, with the call its rule needs before acting; null on the objective itself. */
|
|
1368
|
+
step: {
|
|
1369
|
+
key: string;
|
|
1370
|
+
title: string;
|
|
1371
|
+
rule: PlaybookStepRule;
|
|
1372
|
+
action: string | null;
|
|
1373
|
+
call: string | null;
|
|
1374
|
+
} | null;
|
|
1375
|
+
}
|
|
1278
1376
|
/** A report published for a task, as its context names it. */
|
|
1279
1377
|
export interface TaskContextReport {
|
|
1280
1378
|
id: string;
|
|
@@ -2306,4 +2404,286 @@ export interface ScreenData {
|
|
|
2306
2404
|
/** The approval a person decides, for an `ask` verdict. */
|
|
2307
2405
|
approval: ScreenApprovalRef | null;
|
|
2308
2406
|
}
|
|
2407
|
+
export type KnowledgeKind = "fact" | "convention" | "decision" | "procedure" | "glossary" | "contact" | "known_issue";
|
|
2408
|
+
export type KnowledgeStatus = "proposed" | "confirmed" | "rejected" | "retired" | "superseded";
|
|
2409
|
+
/** `open` is proposed and confirmed together. */
|
|
2410
|
+
export type KnowledgeStatusFilter = KnowledgeStatus | "open" | "all";
|
|
2411
|
+
/** Where an entry came from. */
|
|
2412
|
+
export interface KnowledgeSource {
|
|
2413
|
+
kind: "manual" | "finding" | "decision" | "import" | "url" | "agent";
|
|
2414
|
+
id?: string;
|
|
2415
|
+
url?: string;
|
|
2416
|
+
label?: string;
|
|
2417
|
+
}
|
|
2418
|
+
/** One entry of the organisation's knowledge. Only `confirmed` is to be relied on. */
|
|
2419
|
+
export interface KnowledgeEntryData {
|
|
2420
|
+
id: string;
|
|
2421
|
+
url: string;
|
|
2422
|
+
kind: KnowledgeKind;
|
|
2423
|
+
kindLabel: string;
|
|
2424
|
+
title: string;
|
|
2425
|
+
body: string;
|
|
2426
|
+
tags: string[];
|
|
2427
|
+
status: KnowledgeStatus;
|
|
2428
|
+
workspaceId: string | null;
|
|
2429
|
+
flowId: string | null;
|
|
2430
|
+
/** The confirmed entry this replaces once it is confirmed. */
|
|
2431
|
+
supersedesId: string | null;
|
|
2432
|
+
supersededById: string | null;
|
|
2433
|
+
source: KnowledgeSource;
|
|
2434
|
+
owner: string | null;
|
|
2435
|
+
reviewDueOn: string | null;
|
|
2436
|
+
reviewOverdue: boolean;
|
|
2437
|
+
lastReviewedAt: string | null;
|
|
2438
|
+
confirmedBy: string | null;
|
|
2439
|
+
confirmedAt: string | null;
|
|
2440
|
+
decisionNote: string | null;
|
|
2441
|
+
retiredAt: string | null;
|
|
2442
|
+
retiredReason: string | null;
|
|
2443
|
+
externalId: string | null;
|
|
2444
|
+
proposedBy: string;
|
|
2445
|
+
createdAt: string;
|
|
2446
|
+
updatedAt: string;
|
|
2447
|
+
}
|
|
2448
|
+
export interface KnowledgeDetail extends KnowledgeEntryData {
|
|
2449
|
+
/** Earlier versions this replaced and later ones that replaced it, oldest first. */
|
|
2450
|
+
history: {
|
|
2451
|
+
id: string;
|
|
2452
|
+
title: string;
|
|
2453
|
+
status: KnowledgeStatus;
|
|
2454
|
+
confirmedAt: string | null;
|
|
2455
|
+
url: string;
|
|
2456
|
+
}[];
|
|
2457
|
+
/** A proposed revision waiting for a person, on a confirmed entry. */
|
|
2458
|
+
pendingRevision: {
|
|
2459
|
+
id: string;
|
|
2460
|
+
title: string;
|
|
2461
|
+
url: string;
|
|
2462
|
+
} | null;
|
|
2463
|
+
}
|
|
2464
|
+
export interface ProposeKnowledgeInput {
|
|
2465
|
+
kind: KnowledgeKind;
|
|
2466
|
+
/** The fact or rule in one line. */
|
|
2467
|
+
title: string;
|
|
2468
|
+
/** The detail another agent needs to act on it. A secret is refused. */
|
|
2469
|
+
body: string;
|
|
2470
|
+
tags?: string[];
|
|
2471
|
+
/** One workspace only; the whole organisation when omitted. */
|
|
2472
|
+
workspaceId?: string;
|
|
2473
|
+
flowId?: string;
|
|
2474
|
+
/** The confirmed entry this would replace, once a person confirms it. */
|
|
2475
|
+
supersedesId?: string;
|
|
2476
|
+
sourceUrl?: string;
|
|
2477
|
+
sourceLabel?: string;
|
|
2478
|
+
/** Your own reference. An open entry with the same one comes back instead of a second. */
|
|
2479
|
+
externalId?: string;
|
|
2480
|
+
}
|
|
2481
|
+
export interface ProposedKnowledge {
|
|
2482
|
+
entry: KnowledgeEntryData;
|
|
2483
|
+
resumed: boolean;
|
|
2484
|
+
/** Personal data seen in what you wrote, said back to you; null when none. */
|
|
2485
|
+
screening: string | null;
|
|
2486
|
+
}
|
|
2487
|
+
export interface EditKnowledgeInput {
|
|
2488
|
+
kind?: KnowledgeKind;
|
|
2489
|
+
title?: string;
|
|
2490
|
+
body?: string;
|
|
2491
|
+
tags?: string[];
|
|
2492
|
+
}
|
|
2493
|
+
export interface SearchKnowledgeInput {
|
|
2494
|
+
/** Words, ranked by relevance. Omit for the newest. */
|
|
2495
|
+
q?: string;
|
|
2496
|
+
kind?: KnowledgeKind;
|
|
2497
|
+
/** `confirmed` when omitted. */
|
|
2498
|
+
status?: KnowledgeStatusFilter;
|
|
2499
|
+
workspaceId?: string;
|
|
2500
|
+
flowId?: string;
|
|
2501
|
+
limit?: number;
|
|
2502
|
+
}
|
|
2503
|
+
export interface KnowledgeSearchResult {
|
|
2504
|
+
entries: KnowledgeEntryData[];
|
|
2505
|
+
/** True when the list was cut at the limit. */
|
|
2506
|
+
more: boolean;
|
|
2507
|
+
}
|
|
2508
|
+
export interface PromoteFindingInput {
|
|
2509
|
+
kind?: KnowledgeKind;
|
|
2510
|
+
title?: string;
|
|
2511
|
+
body?: string;
|
|
2512
|
+
tags?: string[];
|
|
2513
|
+
}
|
|
2514
|
+
export interface ImportKnowledgeInput {
|
|
2515
|
+
/** A Deliverd export, or a notes file such as AGENTS.md. Each heading becomes one proposed entry. */
|
|
2516
|
+
markdown: string;
|
|
2517
|
+
workspaceId?: string;
|
|
2518
|
+
/** Where the file came from, e.g. the repository and path. */
|
|
2519
|
+
source?: string;
|
|
2520
|
+
}
|
|
2521
|
+
export interface ImportedKnowledge {
|
|
2522
|
+
created: KnowledgeEntryData[];
|
|
2523
|
+
skipped: {
|
|
2524
|
+
title: string;
|
|
2525
|
+
reason: string;
|
|
2526
|
+
}[];
|
|
2527
|
+
}
|
|
2528
|
+
export interface ExportKnowledgeInput {
|
|
2529
|
+
/** `confirmed` when omitted. */
|
|
2530
|
+
status?: KnowledgeStatusFilter;
|
|
2531
|
+
workspaceId?: string;
|
|
2532
|
+
}
|
|
2533
|
+
/** A JSON export: portable entries, with their scope named rather than numbered. */
|
|
2534
|
+
export interface KnowledgeExport {
|
|
2535
|
+
format: "deliverd-knowledge";
|
|
2536
|
+
version: 1;
|
|
2537
|
+
organisation: string;
|
|
2538
|
+
exportedAt: string;
|
|
2539
|
+
entries: {
|
|
2540
|
+
id?: string;
|
|
2541
|
+
kind: KnowledgeKind;
|
|
2542
|
+
title: string;
|
|
2543
|
+
body: string;
|
|
2544
|
+
tags: string[];
|
|
2545
|
+
status?: KnowledgeStatus;
|
|
2546
|
+
/** The workspace's name, or Organisation. */
|
|
2547
|
+
scope?: string | null;
|
|
2548
|
+
owner?: string | null;
|
|
2549
|
+
confirmedBy?: string | null;
|
|
2550
|
+
confirmedOn?: string | null;
|
|
2551
|
+
reviewDueOn?: string | null;
|
|
2552
|
+
source: KnowledgeSource;
|
|
2553
|
+
}[];
|
|
2554
|
+
}
|
|
2555
|
+
/** What a task and its side tasks were given, newest first. */
|
|
2556
|
+
export interface ContextGiven {
|
|
2557
|
+
at: string;
|
|
2558
|
+
to: string;
|
|
2559
|
+
via: "task_context" | "playbook_start";
|
|
2560
|
+
playbook: {
|
|
2561
|
+
id: string;
|
|
2562
|
+
title: string;
|
|
2563
|
+
version: number;
|
|
2564
|
+
} | null;
|
|
2565
|
+
knowledge: {
|
|
2566
|
+
id: string;
|
|
2567
|
+
title: string;
|
|
2568
|
+
status: KnowledgeStatus;
|
|
2569
|
+
confirmedBy: string | null;
|
|
2570
|
+
url: string;
|
|
2571
|
+
}[];
|
|
2572
|
+
}
|
|
2573
|
+
export type PlaybookStatus = "draft" | "awaiting_approval" | "not_approved" | "in_force" | "superseded" | "retired";
|
|
2574
|
+
/** What applies before a step's action: nothing, `check_gate`, `request_approval` or `request_review`. */
|
|
2575
|
+
export type PlaybookStepRule = "none" | "gate" | "approval" | "review";
|
|
2576
|
+
export interface PlaybookStep {
|
|
2577
|
+
key: string;
|
|
2578
|
+
title: string;
|
|
2579
|
+
instruction: string;
|
|
2580
|
+
rule: PlaybookStepRule;
|
|
2581
|
+
/** For a gate step: the action to check, such as `payments.send`. */
|
|
2582
|
+
action?: string | null;
|
|
2583
|
+
knowledgeIds: string[];
|
|
2584
|
+
}
|
|
2585
|
+
export interface PlaybookInput {
|
|
2586
|
+
name: string;
|
|
2587
|
+
description: string;
|
|
2588
|
+
required: boolean;
|
|
2589
|
+
}
|
|
2590
|
+
export interface PlaybookData {
|
|
2591
|
+
id: string;
|
|
2592
|
+
url: string;
|
|
2593
|
+
/** Every version of one playbook shares it. */
|
|
2594
|
+
familyId: string;
|
|
2595
|
+
version: number;
|
|
2596
|
+
status: PlaybookStatus;
|
|
2597
|
+
title: string;
|
|
2598
|
+
purpose: string;
|
|
2599
|
+
workspaceId: string | null;
|
|
2600
|
+
inputs: PlaybookInput[];
|
|
2601
|
+
steps: PlaybookStep[];
|
|
2602
|
+
knowledgeIds: string[];
|
|
2603
|
+
note: string | null;
|
|
2604
|
+
approval: {
|
|
2605
|
+
id: string;
|
|
2606
|
+
url: string;
|
|
2607
|
+
status: string;
|
|
2608
|
+
} | null;
|
|
2609
|
+
publishedAt: string | null;
|
|
2610
|
+
publishedBy: string | null;
|
|
2611
|
+
retiredAt: string | null;
|
|
2612
|
+
createdBy: string;
|
|
2613
|
+
createdAt: string;
|
|
2614
|
+
updatedAt: string;
|
|
2615
|
+
}
|
|
2616
|
+
/** A playbook's newest version, and which one is in force. */
|
|
2617
|
+
export interface PlaybookSummary extends PlaybookData {
|
|
2618
|
+
inForce: {
|
|
2619
|
+
id: string;
|
|
2620
|
+
version: number;
|
|
2621
|
+
url: string;
|
|
2622
|
+
} | null;
|
|
2623
|
+
}
|
|
2624
|
+
export interface PlaybookDetail extends PlaybookData {
|
|
2625
|
+
versions: {
|
|
2626
|
+
id: string;
|
|
2627
|
+
version: number;
|
|
2628
|
+
status: PlaybookStatus;
|
|
2629
|
+
url: string;
|
|
2630
|
+
}[];
|
|
2631
|
+
inForceId: string | null;
|
|
2632
|
+
knowledge: KnowledgeEntryData[];
|
|
2633
|
+
}
|
|
2634
|
+
export interface DraftPlaybookInput {
|
|
2635
|
+
/** The job, as people name it. */
|
|
2636
|
+
title: string;
|
|
2637
|
+
/** The outcome. Becomes the objective of every run. */
|
|
2638
|
+
purpose: string;
|
|
2639
|
+
steps: {
|
|
2640
|
+
key?: string;
|
|
2641
|
+
title: string;
|
|
2642
|
+
instruction: string;
|
|
2643
|
+
rule?: PlaybookStepRule;
|
|
2644
|
+
action?: string;
|
|
2645
|
+
knowledgeIds?: string[];
|
|
2646
|
+
}[];
|
|
2647
|
+
inputs?: {
|
|
2648
|
+
name: string;
|
|
2649
|
+
description?: string;
|
|
2650
|
+
required?: boolean;
|
|
2651
|
+
}[];
|
|
2652
|
+
knowledgeIds?: string[];
|
|
2653
|
+
workspaceId?: string;
|
|
2654
|
+
note?: string;
|
|
2655
|
+
}
|
|
2656
|
+
export interface StartPlaybookInput {
|
|
2657
|
+
/** A name for this run; the playbook's title when omitted. */
|
|
2658
|
+
title?: string;
|
|
2659
|
+
inputs?: Record<string, string>;
|
|
2660
|
+
workspaceId?: string;
|
|
2661
|
+
flowId?: string;
|
|
2662
|
+
/** An open run you started under it comes back instead of a second. */
|
|
2663
|
+
externalId?: string;
|
|
2664
|
+
sessionUrl?: string;
|
|
2665
|
+
}
|
|
2666
|
+
export interface StartedPlaybook {
|
|
2667
|
+
objective: TaskData;
|
|
2668
|
+
resumed: boolean;
|
|
2669
|
+
playbook: {
|
|
2670
|
+
id: string;
|
|
2671
|
+
title: string;
|
|
2672
|
+
version: number;
|
|
2673
|
+
};
|
|
2674
|
+
/** One side task per step, in order. Empty when resumed. */
|
|
2675
|
+
steps: {
|
|
2676
|
+
key: string;
|
|
2677
|
+
taskId: string;
|
|
2678
|
+
title: string;
|
|
2679
|
+
rule: PlaybookStepRule;
|
|
2680
|
+
}[];
|
|
2681
|
+
/** True when you named an older version and the one in force ran instead. */
|
|
2682
|
+
ranOlderVersion: boolean;
|
|
2683
|
+
}
|
|
2684
|
+
export interface RequestPlaybookApprovalInput {
|
|
2685
|
+
/** Emails, names or groups; the organisation's administrators when omitted. */
|
|
2686
|
+
approvers?: string[];
|
|
2687
|
+
note?: string;
|
|
2688
|
+
}
|
|
2309
2689
|
//# sourceMappingURL=types.d.ts.map
|