exponential-sdk 1.15.0 → 1.17.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 +65 -0
- package/dist/index.d.ts +540 -1
- package/dist/index.js +137 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,6 +122,71 @@ const projectActions = await client.actions.getProjectActions("proj-123");
|
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
125
|
+
### Decisions
|
|
126
|
+
|
|
127
|
+
The workspace Decision Log (ADR-0060). **An open question is a decision with
|
|
128
|
+
status `OPEN`** — there is no separate model, and that is exactly what the
|
|
129
|
+
"Open questions" panel on a meeting page reads.
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
// Log a decision from a meeting
|
|
133
|
+
await client.decisions.create({
|
|
134
|
+
workspaceId: "ws-123",
|
|
135
|
+
statement: "Ship the importer behind a flag",
|
|
136
|
+
body: "## Context\n...\n## Consequences\n...",
|
|
137
|
+
status: "ACCEPTED",
|
|
138
|
+
source: "AGENT",
|
|
139
|
+
transcriptionSessionId: "meeting-123",
|
|
140
|
+
deciders: [{ name: "Ada", email: "ada@example.com" }],
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// Log an open question from the same meeting
|
|
144
|
+
await client.decisions.create({
|
|
145
|
+
workspaceId: "ws-123",
|
|
146
|
+
statement: "Do we backfill historical rows?",
|
|
147
|
+
status: "OPEN",
|
|
148
|
+
transcriptionSessionId: "meeting-123",
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// Both panels for one meeting, drafts included if you can edit it
|
|
152
|
+
const { decisions, canLogDecision } = await client.decisions.listForMeeting("meeting-123");
|
|
153
|
+
|
|
154
|
+
// The log, filtered
|
|
155
|
+
const open = await client.decisions.list({ workspaceId: "ws-123", statuses: ["OPEN"] });
|
|
156
|
+
|
|
157
|
+
// Answer an open question, then record what implemented it
|
|
158
|
+
await client.decisions.setStatus({ workspaceId: "ws-123", decisionId: "d1", status: "ACCEPTED" });
|
|
159
|
+
await client.decisions.linkTicket("ws-123", "d1", "ticket-123");
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### Statuses
|
|
163
|
+
|
|
164
|
+
`OPEN` (open question) · `PROPOSED` · `ACCEPTED` · `SUPERSEDED` · `DEPRECATED`
|
|
165
|
+
|
|
166
|
+
`SUPERSEDED` and `DEPRECATED` are reached through `setStatus`, never as a
|
|
167
|
+
birth state.
|
|
168
|
+
|
|
169
|
+
#### Sources
|
|
170
|
+
|
|
171
|
+
`MEETING` · `MANUAL` · `AGENT`
|
|
172
|
+
|
|
173
|
+
#### Evidence
|
|
174
|
+
|
|
175
|
+
Evidence turns are quotes from the meeting's transcript, and the server checks
|
|
176
|
+
them: the `turnIndex` must resolve to a real turn and the words must be that
|
|
177
|
+
turn's (compared loosely for case, punctuation and whitespace). Turns that
|
|
178
|
+
don't match are **dropped**, and `speaker`/`startTime` are replaced with the
|
|
179
|
+
transcript's own values. Evidence therefore requires `transcriptionSessionId`;
|
|
180
|
+
sending it without one is a `BAD_REQUEST`.
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
// Let the server propose decisions from a meeting, for someone to review
|
|
184
|
+
const { draftCount, discardedWithoutEvidence } =
|
|
185
|
+
await client.decisions.extractDrafts("meeting-123");
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
125
190
|
### Configuration
|
|
126
191
|
|
|
127
192
|
Credentials are stored persistently using the OS keychain via [`conf`](https://github.com/sindresorhus/conf).
|
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,49 @@ type MeetingUpdateDetailsProcedureInput = {
|
|
|
178
178
|
workspaceId?: string | null;
|
|
179
179
|
meetingDate?: Date | null;
|
|
180
180
|
};
|
|
181
|
+
type DecisionStatusInput = 'OPEN' | 'PROPOSED' | 'ACCEPTED' | 'SUPERSEDED' | 'DEPRECATED';
|
|
182
|
+
type DecisionSourceInput = 'MEETING' | 'MANUAL' | 'AGENT';
|
|
183
|
+
type DecisionEvidenceInput = {
|
|
184
|
+
turnIndex: number;
|
|
185
|
+
speaker?: string | null;
|
|
186
|
+
startTime?: number | null;
|
|
187
|
+
text: string;
|
|
188
|
+
};
|
|
189
|
+
type DecisionDeciderProcedureInput = {
|
|
190
|
+
userId?: string | null;
|
|
191
|
+
name: string;
|
|
192
|
+
email?: string | null;
|
|
193
|
+
};
|
|
194
|
+
type DecisionCreateProcedureInput = {
|
|
195
|
+
workspaceId: string;
|
|
196
|
+
statement: string;
|
|
197
|
+
body?: string | null;
|
|
198
|
+
status?: DecisionStatusInput;
|
|
199
|
+
source?: DecisionSourceInput;
|
|
200
|
+
decidedAt?: Date | null;
|
|
201
|
+
ownerId?: string | null;
|
|
202
|
+
transcriptionSessionId?: string | null;
|
|
203
|
+
occurrenceId?: string | null;
|
|
204
|
+
productId?: string | null;
|
|
205
|
+
projectId?: string | null;
|
|
206
|
+
goalId?: number | null;
|
|
207
|
+
keyResultId?: string | null;
|
|
208
|
+
deciders?: DecisionDeciderProcedureInput[];
|
|
209
|
+
evidence?: DecisionEvidenceInput[];
|
|
210
|
+
};
|
|
211
|
+
type DecisionUpdateProcedureInput = {
|
|
212
|
+
workspaceId: string;
|
|
213
|
+
decisionId: string;
|
|
214
|
+
statement?: string;
|
|
215
|
+
body?: string | null;
|
|
216
|
+
decidedAt?: Date | null;
|
|
217
|
+
ownerId?: string | null;
|
|
218
|
+
productId?: string | null;
|
|
219
|
+
projectId?: string | null;
|
|
220
|
+
goalId?: number | null;
|
|
221
|
+
keyResultId?: string | null;
|
|
222
|
+
adrDocumentId?: string | null;
|
|
223
|
+
};
|
|
181
224
|
interface TrpcClient {
|
|
182
225
|
transcription: {
|
|
183
226
|
getAllTranscriptions: {
|
|
@@ -204,6 +247,16 @@ interface TrpcClient {
|
|
|
204
247
|
title: string;
|
|
205
248
|
}) => Promise<unknown>;
|
|
206
249
|
};
|
|
250
|
+
deleteTranscription: {
|
|
251
|
+
mutate: (input: {
|
|
252
|
+
id: string;
|
|
253
|
+
}) => Promise<unknown>;
|
|
254
|
+
};
|
|
255
|
+
bulkDeleteTranscriptions: {
|
|
256
|
+
mutate: (input: {
|
|
257
|
+
ids: string[];
|
|
258
|
+
}) => Promise<unknown>;
|
|
259
|
+
};
|
|
207
260
|
};
|
|
208
261
|
search: {
|
|
209
262
|
global: {
|
|
@@ -468,6 +521,100 @@ interface TrpcClient {
|
|
|
468
521
|
}) => Promise<unknown>;
|
|
469
522
|
};
|
|
470
523
|
};
|
|
524
|
+
decision: {
|
|
525
|
+
list: {
|
|
526
|
+
query: (input: {
|
|
527
|
+
workspaceId: string;
|
|
528
|
+
statuses?: DecisionStatusInput[];
|
|
529
|
+
sources?: DecisionSourceInput[];
|
|
530
|
+
/** A product id, or "workspace" for decisions with no product. */
|
|
531
|
+
productId?: string;
|
|
532
|
+
includeWorkspaceWide?: boolean;
|
|
533
|
+
projectId?: string;
|
|
534
|
+
search?: string;
|
|
535
|
+
/** One decision by its workspace sequence number — `D-0003` → 3. */
|
|
536
|
+
number?: number;
|
|
537
|
+
limit?: number;
|
|
538
|
+
}) => Promise<unknown[]>;
|
|
539
|
+
};
|
|
540
|
+
get: {
|
|
541
|
+
query: (input: {
|
|
542
|
+
workspaceId: string;
|
|
543
|
+
decisionId: string;
|
|
544
|
+
}) => Promise<unknown>;
|
|
545
|
+
};
|
|
546
|
+
/** Workspace comes from the meeting; drafts included for meeting editors. */
|
|
547
|
+
listForMeeting: {
|
|
548
|
+
query: (input: {
|
|
549
|
+
transcriptionSessionId: string;
|
|
550
|
+
}) => Promise<unknown>;
|
|
551
|
+
};
|
|
552
|
+
listForAdr: {
|
|
553
|
+
query: (input: {
|
|
554
|
+
workspaceId: string;
|
|
555
|
+
adrDocumentId: string;
|
|
556
|
+
}) => Promise<unknown[]>;
|
|
557
|
+
};
|
|
558
|
+
/** Extract draft decisions from a meeting's notes and transcript. */
|
|
559
|
+
extractDrafts: {
|
|
560
|
+
mutate: (input: {
|
|
561
|
+
transcriptionSessionId: string;
|
|
562
|
+
}) => Promise<unknown>;
|
|
563
|
+
};
|
|
564
|
+
create: {
|
|
565
|
+
mutate: (input: DecisionCreateProcedureInput) => Promise<unknown>;
|
|
566
|
+
};
|
|
567
|
+
update: {
|
|
568
|
+
mutate: (input: DecisionUpdateProcedureInput) => Promise<unknown>;
|
|
569
|
+
};
|
|
570
|
+
setStatus: {
|
|
571
|
+
mutate: (input: {
|
|
572
|
+
workspaceId: string;
|
|
573
|
+
decisionId: string;
|
|
574
|
+
status: DecisionStatusInput;
|
|
575
|
+
supersededById?: string | null;
|
|
576
|
+
}) => Promise<unknown>;
|
|
577
|
+
};
|
|
578
|
+
linkTicket: {
|
|
579
|
+
mutate: (input: {
|
|
580
|
+
workspaceId: string;
|
|
581
|
+
decisionId: string;
|
|
582
|
+
ticketId: string;
|
|
583
|
+
}) => Promise<unknown>;
|
|
584
|
+
};
|
|
585
|
+
linkFeature: {
|
|
586
|
+
mutate: (input: {
|
|
587
|
+
workspaceId: string;
|
|
588
|
+
decisionId: string;
|
|
589
|
+
featureId: string;
|
|
590
|
+
}) => Promise<unknown>;
|
|
591
|
+
};
|
|
592
|
+
/** `linkId` is the DecisionLink id, not the ticket or feature id. */
|
|
593
|
+
unlink: {
|
|
594
|
+
mutate: (input: {
|
|
595
|
+
workspaceId: string;
|
|
596
|
+
linkId: string;
|
|
597
|
+
}) => Promise<unknown>;
|
|
598
|
+
};
|
|
599
|
+
confirmDraft: {
|
|
600
|
+
mutate: (input: {
|
|
601
|
+
workspaceId: string;
|
|
602
|
+
decisionId: string;
|
|
603
|
+
}) => Promise<unknown>;
|
|
604
|
+
};
|
|
605
|
+
rejectDraft: {
|
|
606
|
+
mutate: (input: {
|
|
607
|
+
workspaceId: string;
|
|
608
|
+
decisionId: string;
|
|
609
|
+
}) => Promise<unknown>;
|
|
610
|
+
};
|
|
611
|
+
deleteDraft: {
|
|
612
|
+
mutate: (input: {
|
|
613
|
+
workspaceId: string;
|
|
614
|
+
decisionId: string;
|
|
615
|
+
}) => Promise<unknown>;
|
|
616
|
+
};
|
|
617
|
+
};
|
|
471
618
|
crmApi: {
|
|
472
619
|
contactList: {
|
|
473
620
|
query: (input: {
|
|
@@ -2423,6 +2570,381 @@ declare class ContactsApi {
|
|
|
2423
2570
|
enrich(id: string): Promise<EnrichContactResult>;
|
|
2424
2571
|
}
|
|
2425
2572
|
|
|
2573
|
+
/**
|
|
2574
|
+
* Lifecycle of a decision.
|
|
2575
|
+
*
|
|
2576
|
+
* - `OPEN` — an open question: raised, not yet decided. This is how the
|
|
2577
|
+
* "Open questions" panel is populated; there is no separate model.
|
|
2578
|
+
* - `PROPOSED` — put forward, not yet agreed (the server's default).
|
|
2579
|
+
* - `ACCEPTED` — decided.
|
|
2580
|
+
* - `SUPERSEDED` / `DEPRECATED` — end states reached through `setStatus`;
|
|
2581
|
+
* `create` rejects them as a birth state.
|
|
2582
|
+
*/
|
|
2583
|
+
type DecisionStatus = 'OPEN' | 'PROPOSED' | 'ACCEPTED' | 'SUPERSEDED' | 'DEPRECATED';
|
|
2584
|
+
/** Who logged it: a meeting, a person by hand, or an agent. */
|
|
2585
|
+
type DecisionSource = 'MEETING' | 'MANUAL' | 'AGENT';
|
|
2586
|
+
/**
|
|
2587
|
+
* Draft decisions are invisible everywhere except the source meeting's draft
|
|
2588
|
+
* views, and only to people who can edit that meeting.
|
|
2589
|
+
*/
|
|
2590
|
+
type DecisionReviewState = 'DRAFT' | 'CONFIRMED' | 'REJECTED';
|
|
2591
|
+
/** A quoted transcript turn backing a decision (max 50 per decision). */
|
|
2592
|
+
interface DecisionEvidenceTurn {
|
|
2593
|
+
turnIndex: number;
|
|
2594
|
+
speaker?: string | null;
|
|
2595
|
+
startTime?: number | null;
|
|
2596
|
+
text: string;
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* Someone who made the decision. External participants have no `User` row, so
|
|
2600
|
+
* `userId` is null and the name/email pair carries them.
|
|
2601
|
+
*/
|
|
2602
|
+
interface DecisionDecider {
|
|
2603
|
+
id: string;
|
|
2604
|
+
userId: string | null;
|
|
2605
|
+
name: string;
|
|
2606
|
+
email: string | null;
|
|
2607
|
+
}
|
|
2608
|
+
interface DecisionUserRef {
|
|
2609
|
+
id: string;
|
|
2610
|
+
name: string | null;
|
|
2611
|
+
email?: string | null;
|
|
2612
|
+
image?: string | null;
|
|
2613
|
+
}
|
|
2614
|
+
interface DecisionProductRef {
|
|
2615
|
+
id: string;
|
|
2616
|
+
name: string;
|
|
2617
|
+
slug: string;
|
|
2618
|
+
}
|
|
2619
|
+
interface DecisionProjectRef {
|
|
2620
|
+
id: string;
|
|
2621
|
+
name: string;
|
|
2622
|
+
slug: string;
|
|
2623
|
+
}
|
|
2624
|
+
interface DecisionMeetingRef {
|
|
2625
|
+
id: string;
|
|
2626
|
+
title: string | null;
|
|
2627
|
+
meetingDate?: Date | null;
|
|
2628
|
+
workspaceId?: string | null;
|
|
2629
|
+
}
|
|
2630
|
+
interface DecisionOccurrenceRef {
|
|
2631
|
+
id: string;
|
|
2632
|
+
scheduledStart: Date;
|
|
2633
|
+
ceremony: {
|
|
2634
|
+
id: string;
|
|
2635
|
+
name: string;
|
|
2636
|
+
slug: string;
|
|
2637
|
+
};
|
|
2638
|
+
}
|
|
2639
|
+
/** A neighbour in the supersession chain. */
|
|
2640
|
+
interface DecisionChainRef {
|
|
2641
|
+
id: string;
|
|
2642
|
+
number: number;
|
|
2643
|
+
statement: string;
|
|
2644
|
+
status: DecisionStatus;
|
|
2645
|
+
}
|
|
2646
|
+
interface DecisionTicketRef {
|
|
2647
|
+
id: string;
|
|
2648
|
+
shortId: string | null;
|
|
2649
|
+
number: number;
|
|
2650
|
+
title: string;
|
|
2651
|
+
status: string;
|
|
2652
|
+
productId: string;
|
|
2653
|
+
}
|
|
2654
|
+
interface DecisionFeatureRef {
|
|
2655
|
+
id: string;
|
|
2656
|
+
name: string;
|
|
2657
|
+
status: string;
|
|
2658
|
+
}
|
|
2659
|
+
/** An "implemented by" edge to a ticket or a feature. */
|
|
2660
|
+
interface DecisionLink {
|
|
2661
|
+
id: string;
|
|
2662
|
+
decisionId: string;
|
|
2663
|
+
ticketId: string | null;
|
|
2664
|
+
featureId: string | null;
|
|
2665
|
+
createdById: string;
|
|
2666
|
+
createdAt: Date;
|
|
2667
|
+
ticket?: DecisionTicketRef | null;
|
|
2668
|
+
feature?: DecisionFeatureRef | null;
|
|
2669
|
+
createdBy?: DecisionUserRef;
|
|
2670
|
+
}
|
|
2671
|
+
interface DecisionAdrRef {
|
|
2672
|
+
id: string;
|
|
2673
|
+
number: number;
|
|
2674
|
+
title: string;
|
|
2675
|
+
repositoryId: string | null;
|
|
2676
|
+
}
|
|
2677
|
+
/**
|
|
2678
|
+
* A list row — enough for the Decision Log and the meeting panels, without
|
|
2679
|
+
* the body, evidence text, deciders or links.
|
|
2680
|
+
*/
|
|
2681
|
+
interface DecisionListRow {
|
|
2682
|
+
id: string;
|
|
2683
|
+
workspaceId: string;
|
|
2684
|
+
/** Sequence number within the workspace; `label` is its rendered form. */
|
|
2685
|
+
number: number;
|
|
2686
|
+
/** `D-` plus the zero-padded number, e.g. `D-0042`. */
|
|
2687
|
+
label: string;
|
|
2688
|
+
statement: string;
|
|
2689
|
+
status: DecisionStatus;
|
|
2690
|
+
source: DecisionSource;
|
|
2691
|
+
decidedAt: Date | null;
|
|
2692
|
+
updatedAt: Date;
|
|
2693
|
+
transcriptionSessionId: string | null;
|
|
2694
|
+
occurrenceId: string | null;
|
|
2695
|
+
productId: string | null;
|
|
2696
|
+
projectId: string | null;
|
|
2697
|
+
supersededById: string | null;
|
|
2698
|
+
evidenceCount: number;
|
|
2699
|
+
product: DecisionProductRef | null;
|
|
2700
|
+
project: DecisionProjectRef | null;
|
|
2701
|
+
occurrence: DecisionOccurrenceRef | null;
|
|
2702
|
+
transcriptionSession: {
|
|
2703
|
+
id: string;
|
|
2704
|
+
title: string | null;
|
|
2705
|
+
} | null;
|
|
2706
|
+
/**
|
|
2707
|
+
* `listForMeeting` rows carry `statement` and `status` too; the workspace
|
|
2708
|
+
* log's rows carry only the id and label.
|
|
2709
|
+
*/
|
|
2710
|
+
supersededBy: {
|
|
2711
|
+
id: string;
|
|
2712
|
+
label: string;
|
|
2713
|
+
statement?: string;
|
|
2714
|
+
status?: DecisionStatus;
|
|
2715
|
+
} | null;
|
|
2716
|
+
/** Present only on `listForMeeting` rows. */
|
|
2717
|
+
reviewState?: DecisionReviewState;
|
|
2718
|
+
_count?: {
|
|
2719
|
+
links: number;
|
|
2720
|
+
deciders: number;
|
|
2721
|
+
};
|
|
2722
|
+
}
|
|
2723
|
+
/** One decision in full, as `get`, `create`, `update` and `setStatus` return it. */
|
|
2724
|
+
interface Decision {
|
|
2725
|
+
id: string;
|
|
2726
|
+
workspaceId: string;
|
|
2727
|
+
number: number;
|
|
2728
|
+
label: string;
|
|
2729
|
+
statement: string;
|
|
2730
|
+
/** Markdown, with ADR headings (context / alternatives / consequences). */
|
|
2731
|
+
body: string | null;
|
|
2732
|
+
status: DecisionStatus;
|
|
2733
|
+
reviewState: DecisionReviewState;
|
|
2734
|
+
source: DecisionSource;
|
|
2735
|
+
decidedAt: Date | null;
|
|
2736
|
+
ownerId: string | null;
|
|
2737
|
+
createdById: string;
|
|
2738
|
+
confirmedById: string | null;
|
|
2739
|
+
confirmedAt: Date | null;
|
|
2740
|
+
transcriptionSessionId: string | null;
|
|
2741
|
+
occurrenceId: string | null;
|
|
2742
|
+
productId: string | null;
|
|
2743
|
+
projectId: string | null;
|
|
2744
|
+
goalId: number | null;
|
|
2745
|
+
keyResultId: string | null;
|
|
2746
|
+
supersededById: string | null;
|
|
2747
|
+
adrDocumentId: string | null;
|
|
2748
|
+
pendingAdrPrUrl: string | null;
|
|
2749
|
+
evidence: DecisionEvidenceTurn[];
|
|
2750
|
+
createdAt: Date;
|
|
2751
|
+
updatedAt: Date;
|
|
2752
|
+
owner?: DecisionUserRef | null;
|
|
2753
|
+
createdBy?: DecisionUserRef;
|
|
2754
|
+
confirmedBy?: DecisionUserRef | null;
|
|
2755
|
+
deciders?: DecisionDecider[];
|
|
2756
|
+
transcriptionSession?: DecisionMeetingRef | null;
|
|
2757
|
+
occurrence?: DecisionOccurrenceRef | null;
|
|
2758
|
+
product?: DecisionProductRef | null;
|
|
2759
|
+
project?: DecisionProjectRef | null;
|
|
2760
|
+
goal?: {
|
|
2761
|
+
id: number;
|
|
2762
|
+
title: string;
|
|
2763
|
+
} | null;
|
|
2764
|
+
keyResult?: {
|
|
2765
|
+
id: string;
|
|
2766
|
+
title: string;
|
|
2767
|
+
} | null;
|
|
2768
|
+
supersededBy?: DecisionChainRef | null;
|
|
2769
|
+
supersedes?: DecisionChainRef[];
|
|
2770
|
+
adrDocument?: DecisionAdrRef | null;
|
|
2771
|
+
links?: DecisionLink[];
|
|
2772
|
+
/** Present on `get`: whether the caller may write to this decision. */
|
|
2773
|
+
canEdit?: boolean;
|
|
2774
|
+
}
|
|
2775
|
+
/** What `listForMeeting` answers with — the rows plus the caller's rights. */
|
|
2776
|
+
interface MeetingDecisions {
|
|
2777
|
+
decisions: DecisionListRow[];
|
|
2778
|
+
/** False when the caller can't edit the meeting, or it has no workspace. */
|
|
2779
|
+
canLogDecision: boolean;
|
|
2780
|
+
workspaceId: string | null;
|
|
2781
|
+
}
|
|
2782
|
+
/** What `extractDrafts` reports back about one meeting. */
|
|
2783
|
+
interface DraftDecisionsResult {
|
|
2784
|
+
success: boolean;
|
|
2785
|
+
/** The meeting already has confirmed decisions; nothing was extracted. */
|
|
2786
|
+
alreadyPublished: boolean;
|
|
2787
|
+
/** The meeting already had drafts; they were returned, not regenerated. */
|
|
2788
|
+
alreadyDrafted: boolean;
|
|
2789
|
+
/** Drafts now awaiting review (existing or just created). */
|
|
2790
|
+
draftCount: number;
|
|
2791
|
+
draftsCreated: number;
|
|
2792
|
+
/** Candidates dropped because no transcript turn supported them. */
|
|
2793
|
+
discardedWithoutEvidence: number;
|
|
2794
|
+
errors: string[];
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
/** A person who made the decision; `name` is the only required half. */
|
|
2798
|
+
interface DecisionDeciderInput {
|
|
2799
|
+
userId?: string | null;
|
|
2800
|
+
name: string;
|
|
2801
|
+
email?: string | null;
|
|
2802
|
+
}
|
|
2803
|
+
interface DecisionListOptions {
|
|
2804
|
+
workspaceId: string;
|
|
2805
|
+
statuses?: DecisionStatus[];
|
|
2806
|
+
sources?: DecisionSource[];
|
|
2807
|
+
/** A product id, or the literal `"workspace"` for decisions with no product. */
|
|
2808
|
+
productId?: string;
|
|
2809
|
+
/** With a real `productId`: ALSO include decisions that have no product. */
|
|
2810
|
+
includeWorkspaceWide?: boolean;
|
|
2811
|
+
projectId?: string;
|
|
2812
|
+
/** Free-text over statement and body (max 200 characters). */
|
|
2813
|
+
search?: string;
|
|
2814
|
+
/** One decision by its workspace sequence number — `D-0003` is number 3. */
|
|
2815
|
+
number?: number;
|
|
2816
|
+
/** Cap the rows returned (1-500). Unset returns everything visible. */
|
|
2817
|
+
limit?: number;
|
|
2818
|
+
}
|
|
2819
|
+
interface DecisionCreateInput {
|
|
2820
|
+
workspaceId: string;
|
|
2821
|
+
/** The decision itself, or the open question. Max 500 characters. */
|
|
2822
|
+
statement: string;
|
|
2823
|
+
/** Markdown detail — context, alternatives, consequences. Max 20,000. */
|
|
2824
|
+
body?: string | null;
|
|
2825
|
+
/**
|
|
2826
|
+
* Defaults to `PROPOSED` server-side. Pass `OPEN` to log an OPEN QUESTION —
|
|
2827
|
+
* that is the only representation of one. `SUPERSEDED` and `DEPRECATED` are
|
|
2828
|
+
* rejected here; they are `setStatus` transitions.
|
|
2829
|
+
*/
|
|
2830
|
+
status?: DecisionStatus;
|
|
2831
|
+
source?: DecisionSource;
|
|
2832
|
+
decidedAt?: Date | null;
|
|
2833
|
+
ownerId?: string | null;
|
|
2834
|
+
/** Meeting provenance. Requires EDIT access to that meeting. */
|
|
2835
|
+
transcriptionSessionId?: string | null;
|
|
2836
|
+
occurrenceId?: string | null;
|
|
2837
|
+
productId?: string | null;
|
|
2838
|
+
projectId?: string | null;
|
|
2839
|
+
goalId?: number | null;
|
|
2840
|
+
keyResultId?: string | null;
|
|
2841
|
+
/** Max 50. */
|
|
2842
|
+
deciders?: DecisionDeciderInput[];
|
|
2843
|
+
/**
|
|
2844
|
+
* Quoted transcript turns backing the decision (max 50). The server checks
|
|
2845
|
+
* every turn against the meeting's actual transcript: the index must
|
|
2846
|
+
* resolve and the words must be that turn's, compared loosely for case,
|
|
2847
|
+
* punctuation and whitespace. Turns that don't match are DROPPED, silently
|
|
2848
|
+
* from the caller's side, and `speaker`/`startTime` are overwritten with
|
|
2849
|
+
* the transcript's own values. Evidence therefore requires
|
|
2850
|
+
* `transcriptionSessionId` — sending it without one is a BAD_REQUEST.
|
|
2851
|
+
*/
|
|
2852
|
+
evidence?: DecisionEvidenceTurn[];
|
|
2853
|
+
}
|
|
2854
|
+
/** Content and scope only — status changes go through {@link DecisionsApi.setStatus}. */
|
|
2855
|
+
interface DecisionUpdateInput {
|
|
2856
|
+
workspaceId: string;
|
|
2857
|
+
decisionId: string;
|
|
2858
|
+
statement?: string;
|
|
2859
|
+
body?: string | null;
|
|
2860
|
+
decidedAt?: Date | null;
|
|
2861
|
+
ownerId?: string | null;
|
|
2862
|
+
productId?: string | null;
|
|
2863
|
+
projectId?: string | null;
|
|
2864
|
+
goalId?: number | null;
|
|
2865
|
+
keyResultId?: string | null;
|
|
2866
|
+
adrDocumentId?: string | null;
|
|
2867
|
+
}
|
|
2868
|
+
interface DecisionSetStatusInput {
|
|
2869
|
+
workspaceId: string;
|
|
2870
|
+
decisionId: string;
|
|
2871
|
+
status: DecisionStatus;
|
|
2872
|
+
/** Required by convention when moving to `SUPERSEDED`. */
|
|
2873
|
+
supersededById?: string | null;
|
|
2874
|
+
}
|
|
2875
|
+
/**
|
|
2876
|
+
* Decisions — the writable half of the Decision Log (ADR-0060).
|
|
2877
|
+
*
|
|
2878
|
+
* The one thing worth knowing before using this: **an open question is a
|
|
2879
|
+
* decision with status `OPEN`**. There is no separate model, and it is what
|
|
2880
|
+
* the "Open questions" panel on a meeting page reads.
|
|
2881
|
+
*
|
|
2882
|
+
* Reads need workspace `view`; writes need workspace `edit`, and a decision
|
|
2883
|
+
* carrying `transcriptionSessionId` additionally needs edit access to that
|
|
2884
|
+
* meeting.
|
|
2885
|
+
*/
|
|
2886
|
+
declare class DecisionsApi {
|
|
2887
|
+
private client;
|
|
2888
|
+
constructor(client: TrpcClient);
|
|
2889
|
+
/**
|
|
2890
|
+
* Confirmed decisions in a workspace, newest decided first. Drafts are
|
|
2891
|
+
* never included — see {@link listForMeeting} for those.
|
|
2892
|
+
*/
|
|
2893
|
+
list(options: DecisionListOptions): Promise<DecisionListRow[]>;
|
|
2894
|
+
get(workspaceId: string, decisionId: string): Promise<Decision>;
|
|
2895
|
+
/**
|
|
2896
|
+
* Decisions logged from one meeting — both panels' contents. Drafts are
|
|
2897
|
+
* included for callers who can edit the meeting. No workspace id needed:
|
|
2898
|
+
* the meeting resolves it.
|
|
2899
|
+
*/
|
|
2900
|
+
listForMeeting(transcriptionSessionId: string): Promise<MeetingDecisions>;
|
|
2901
|
+
/** Decisions formalised as one ADR ("Decided in"). */
|
|
2902
|
+
listForAdr(workspaceId: string, adrDocumentId: string): Promise<DecisionListRow[]>;
|
|
2903
|
+
/**
|
|
2904
|
+
* Extract draft decisions from a meeting's notes and transcript. Drafts
|
|
2905
|
+
* only — someone confirms or rejects each one. Idempotent per meeting:
|
|
2906
|
+
* existing drafts come back untouched, and a meeting that already has
|
|
2907
|
+
* confirmed decisions reports `alreadyPublished` without calling the model.
|
|
2908
|
+
*/
|
|
2909
|
+
extractDrafts(transcriptionSessionId: string): Promise<DraftDecisionsResult>;
|
|
2910
|
+
/**
|
|
2911
|
+
* Log a decision. Pass `status: 'OPEN'` for an open question, and
|
|
2912
|
+
* `transcriptionSessionId` to attach it to the meeting it came out of.
|
|
2913
|
+
*/
|
|
2914
|
+
create(input: DecisionCreateInput): Promise<Decision>;
|
|
2915
|
+
update(input: DecisionUpdateInput): Promise<Decision>;
|
|
2916
|
+
/**
|
|
2917
|
+
* Lifecycle transition — including answering an open question by moving it
|
|
2918
|
+
* from `OPEN` to `ACCEPTED`.
|
|
2919
|
+
*/
|
|
2920
|
+
setStatus(input: DecisionSetStatusInput): Promise<Decision>;
|
|
2921
|
+
/** "Implemented by" a ticket. Idempotent: an existing link is returned. */
|
|
2922
|
+
linkTicket(workspaceId: string, decisionId: string, ticketId: string): Promise<DecisionLink>;
|
|
2923
|
+
/** "Implemented by" a feature. Idempotent: an existing link is returned. */
|
|
2924
|
+
linkFeature(workspaceId: string, decisionId: string, featureId: string): Promise<DecisionLink>;
|
|
2925
|
+
/** Remove one link, by the `DecisionLink` id (not the ticket/feature id). */
|
|
2926
|
+
unlink(workspaceId: string, linkId: string): Promise<{
|
|
2927
|
+
deleted: boolean;
|
|
2928
|
+
}>;
|
|
2929
|
+
/** Publish a draft into the log. */
|
|
2930
|
+
confirmDraft(workspaceId: string, decisionId: string): Promise<Decision>;
|
|
2931
|
+
/**
|
|
2932
|
+
* Reject a draft. Confirmed decisions are never rejected — deprecate or
|
|
2933
|
+
* supersede them through {@link setStatus}.
|
|
2934
|
+
*/
|
|
2935
|
+
rejectDraft(workspaceId: string, decisionId: string): Promise<{
|
|
2936
|
+
id: string;
|
|
2937
|
+
reviewState: DecisionReviewState;
|
|
2938
|
+
}>;
|
|
2939
|
+
/**
|
|
2940
|
+
* Hard-delete a draft or rejected row. The server refuses for a confirmed
|
|
2941
|
+
* decision — the log keeps its history.
|
|
2942
|
+
*/
|
|
2943
|
+
deleteDraft(workspaceId: string, decisionId: string): Promise<{
|
|
2944
|
+
id: string;
|
|
2945
|
+
}>;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2426
2948
|
type OrganizationSize = '1-10' | '11-50' | '51-200' | '201-500' | '501-1000' | '1000+';
|
|
2427
2949
|
interface Organization {
|
|
2428
2950
|
id: string;
|
|
@@ -3324,6 +3846,22 @@ declare class MeetingsApi {
|
|
|
3324
3846
|
getNotes(id: string): Promise<string | null>;
|
|
3325
3847
|
/** Replace the meeting's notes. */
|
|
3326
3848
|
setNotes(id: string, notes: string): Promise<Meeting>;
|
|
3849
|
+
/**
|
|
3850
|
+
* Permanently delete one meeting. Owner-only: the server answers
|
|
3851
|
+
* NOT_FOUND for a missing id and FORBIDDEN for a meeting you don't own.
|
|
3852
|
+
* Linked actions survive (their meeting link is nulled).
|
|
3853
|
+
*/
|
|
3854
|
+
delete(id: string): Promise<{
|
|
3855
|
+
success: boolean;
|
|
3856
|
+
}>;
|
|
3857
|
+
/**
|
|
3858
|
+
* Permanently delete meetings in bulk. Scoped to meetings the caller
|
|
3859
|
+
* owns — ids that are missing or owned by someone else are silently
|
|
3860
|
+
* skipped, so compare `count` against the ids you sent.
|
|
3861
|
+
*/
|
|
3862
|
+
deleteMany(ids: string[]): Promise<{
|
|
3863
|
+
count: number;
|
|
3864
|
+
}>;
|
|
3327
3865
|
/**
|
|
3328
3866
|
* Append a block to the meeting's notes (separated by a blank line),
|
|
3329
3867
|
* creating them if none exist. Read-modify-write, not atomic.
|
|
@@ -3559,6 +4097,7 @@ declare class ExponentialClient {
|
|
|
3559
4097
|
projects: ProjectsApi;
|
|
3560
4098
|
workspaces: WorkspacesApi;
|
|
3561
4099
|
contacts: ContactsApi;
|
|
4100
|
+
decisions: DecisionsApi;
|
|
3562
4101
|
organizations: OrganizationsApi;
|
|
3563
4102
|
pipelines: PipelinesApi;
|
|
3564
4103
|
tickets: TicketsApi;
|
|
@@ -3579,4 +4118,4 @@ declare class ExponentialClient {
|
|
|
3579
4118
|
});
|
|
3580
4119
|
}
|
|
3581
4120
|
|
|
3582
|
-
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type Area, type AreaCreateInput, type AreaListOptions, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
|
|
4121
|
+
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type Area, type AreaCreateInput, type AreaListOptions, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Decision, type DecisionAdrRef, type DecisionChainRef, type DecisionCreateInput, type DecisionDecider, type DecisionDeciderInput, type DecisionEvidenceTurn, type DecisionFeatureRef, type DecisionLink, type DecisionListOptions, type DecisionListRow, type DecisionMeetingRef, type DecisionOccurrenceRef, type DecisionProductRef, type DecisionProjectRef, type DecisionReviewState, type DecisionSetStatusInput, type DecisionSource, type DecisionStatus, type DecisionTicketRef, type DecisionUpdateInput, type DecisionUserRef, type DraftDecisionsResult, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingDecisions, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
|