@flamingo-stack/openframe-frontend-core 0.0.615 → 0.0.616
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/types/design-doc.d.ts +34 -43
- package/dist/types/design-doc.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types/design-doc.ts +59 -51
|
@@ -5,7 +5,7 @@ import type { EmployeeDirectoryRow } from './employee';
|
|
|
5
5
|
import type { EntityAuthor } from './entity-author';
|
|
6
6
|
/** One value of `design_doc_vocabulary.kind` — the STRUCTURAL list (one per
|
|
7
7
|
* value column), the only design-doc vocabulary that is code. */
|
|
8
|
-
export type DesignDocVocabularyKind = '
|
|
8
|
+
export type DesignDocVocabularyKind = 'tier' | 'spec_mode' | 'participant_status' | 'comment_type' | 'comment_status' | 'link_type' | 'media_type';
|
|
9
9
|
/** A `design_doc_vocabulary` row, as the DAL and the vocabulary API return it. */
|
|
10
10
|
export interface DesignDocVocabularyOption {
|
|
11
11
|
id: number;
|
|
@@ -15,13 +15,13 @@ export interface DesignDocVocabularyOption {
|
|
|
15
15
|
/** A `StatusBadge` colorScheme name (validated against the badge's own union
|
|
16
16
|
* when the hub reads the row — an unknown scheme degrades to 'default'). */
|
|
17
17
|
color_scheme: string;
|
|
18
|
-
/** Human copy for surfaces that
|
|
19
|
-
*
|
|
18
|
+
/** Human copy for surfaces that EXPLAIN a value rather than just naming it —
|
|
19
|
+
* the spec-mode picker's per-option hint. Display only. */
|
|
20
20
|
description: string | null;
|
|
21
21
|
display_order: number;
|
|
22
22
|
is_active: boolean;
|
|
23
|
-
/** Engine capabilities this member claims (`complete`, `
|
|
24
|
-
*
|
|
23
|
+
/** Engine capabilities this member claims (`complete`, `blocks_ready`, …).
|
|
24
|
+
* The names live in the hub's gate module. */
|
|
25
25
|
roles: string[];
|
|
26
26
|
/** link_type only: which renderer previews it. */
|
|
27
27
|
render: DesignDocLinkRender | null;
|
|
@@ -32,31 +32,19 @@ export interface DesignDocVocabularyOption {
|
|
|
32
32
|
/** link_type only: where the artifact comes from, shown beside the label. */
|
|
33
33
|
source: string | null;
|
|
34
34
|
placeholder: string | null;
|
|
35
|
-
/** status only: the verb on the button that moves a doc INTO this status. */
|
|
36
|
-
action_label: string | null;
|
|
37
35
|
}
|
|
38
36
|
/** How the doc page previews a link type. A CAPABILITY (each key is a
|
|
39
37
|
* component in the renderer), so this one IS code — a DB row binds to it. */
|
|
40
38
|
export type DesignDocLinkRender = 'task' | 'figma' | 'claude' | 'link';
|
|
41
|
-
/**
|
|
42
|
-
export interface DesignDocStatusTransition {
|
|
43
|
-
from: string;
|
|
44
|
-
to: string;
|
|
45
|
-
/** From-specific button copy when it differs from the target's verb
|
|
46
|
-
* (`abandoned -> draft` reads "Reopen", not "Back to draft"). */
|
|
47
|
-
action_label: string | null;
|
|
48
|
-
display_order: number;
|
|
49
|
-
}
|
|
50
|
-
/** The whole vocabulary in one payload — what every surface (server gate,
|
|
39
|
+
/** The whole vocabulary in one payload — what every surface (server rules,
|
|
51
40
|
* client badges, pickers, validators) reads instead of a literal list. */
|
|
52
41
|
export interface DesignDocVocabulary {
|
|
53
42
|
options: DesignDocVocabularyOption[];
|
|
54
|
-
transitions: DesignDocStatusTransition[];
|
|
55
43
|
}
|
|
56
|
-
/** A `design_doc_vocabulary.value` of kind `status`. */
|
|
57
|
-
export type DesignDocStatus = string;
|
|
58
44
|
/** A `design_doc_vocabulary.value` of kind `tier`. */
|
|
59
45
|
export type DesignDocTier = string;
|
|
46
|
+
/** A `design_doc_vocabulary.value` of kind `spec_mode`. */
|
|
47
|
+
export type DesignDocSpecMode = string;
|
|
60
48
|
/** A `design_doc_vocabulary.value` of kind `participant_status`. */
|
|
61
49
|
export type DesignDocParticipantStatus = string;
|
|
62
50
|
/** A `design_doc_vocabulary.value` of kind `comment_type`. */
|
|
@@ -114,7 +102,7 @@ export interface DesignDocMedia {
|
|
|
114
102
|
}
|
|
115
103
|
/**
|
|
116
104
|
* A comment. ROOT comments (`parent_comment_id === null`) carry `comment_type`
|
|
117
|
-
* + `status` and
|
|
105
|
+
* + `status` and keep the doc from being ready when `blocking` + `open`; REPLIES carry neither
|
|
118
106
|
* (single-level threads — a reply to a reply is re-parented to the root).
|
|
119
107
|
*/
|
|
120
108
|
export interface DesignDocComment {
|
|
@@ -179,19 +167,15 @@ export interface DesignDoc {
|
|
|
179
167
|
title: string;
|
|
180
168
|
slug: string;
|
|
181
169
|
tier: DesignDocTier;
|
|
170
|
+
/**
|
|
171
|
+
* How much of the solution is knowable before build starts — spec-first
|
|
172
|
+
* (settled up front) or discovery-first (engineering resolves the design
|
|
173
|
+
* while building). A LABEL on the doc: no rule reads it.
|
|
174
|
+
*/
|
|
175
|
+
spec_mode: DesignDocSpecMode;
|
|
182
176
|
summary: string | null;
|
|
183
177
|
content: string | null;
|
|
184
|
-
status: DesignDocStatus;
|
|
185
178
|
author_id: string | null;
|
|
186
|
-
/**
|
|
187
|
-
* EVERYONE who has handed the DRI role away on this doc (appended, never
|
|
188
|
-
* overwritten). The third-party break-glass excludes all of them: a DRI who
|
|
189
|
-
* also holds management could otherwise vacate the seat, act as a "third
|
|
190
|
-
* party" on their own doc and approve it alone — and with a single scalar,
|
|
191
|
-
* simply hand the seat on twice to erase the memory of their own vacating.
|
|
192
|
-
*/
|
|
193
|
-
dri_vacated_by: string[];
|
|
194
|
-
approved_at: string | null;
|
|
195
179
|
created_at: string;
|
|
196
180
|
updated_at: string;
|
|
197
181
|
/** DRI, hydrated via the shared author hydrator. */
|
|
@@ -200,8 +184,8 @@ export interface DesignDoc {
|
|
|
200
184
|
* Engineering feature leads — the people reviewing the doc alongside the
|
|
201
185
|
* department sign-off sections. DISPLAY-ONLY attribution, like
|
|
202
186
|
* `how_i_work_participants`: being listed grants NO rights (nothing in the
|
|
203
|
-
* hub's `design-doc-gate.ts` reads it) and is NOT an input to
|
|
204
|
-
*
|
|
187
|
+
* hub's `design-doc-gate.ts` reads it) and is NOT an input to readiness.
|
|
188
|
+
* The doc-level owner with actual levers is the DRI (`author_id`).
|
|
205
189
|
*
|
|
206
190
|
* Carried on BOTH the list and the detail payload — the dashboard renders
|
|
207
191
|
* their avatars in its own column.
|
|
@@ -242,6 +226,8 @@ export interface CreateDesignDocData {
|
|
|
242
226
|
title: string;
|
|
243
227
|
slug: string;
|
|
244
228
|
tier: DesignDocTier;
|
|
229
|
+
/** Defaults to the `spec_mode` row claiming `default` when omitted. */
|
|
230
|
+
spec_mode?: DesignDocSpecMode;
|
|
245
231
|
summary?: string | null;
|
|
246
232
|
/** Spec markdown (Why / What / How); the create screen carries the same body editor as edit. */
|
|
247
233
|
content?: string | null;
|
|
@@ -253,20 +239,21 @@ export interface CreateDesignDocData {
|
|
|
253
239
|
links: DesignDocLinkInput[];
|
|
254
240
|
}
|
|
255
241
|
/**
|
|
256
|
-
* Doc-level allowlist (PUT). `
|
|
257
|
-
*
|
|
242
|
+
* Doc-level allowlist (PUT). `participants` are NOT here — they only move
|
|
243
|
+
* through their own routes.
|
|
258
244
|
*/
|
|
259
245
|
export interface UpdateDesignDocData {
|
|
260
246
|
title?: string;
|
|
261
247
|
slug?: string;
|
|
262
248
|
tier?: DesignDocTier;
|
|
249
|
+
spec_mode?: DesignDocSpecMode;
|
|
263
250
|
summary?: string | null;
|
|
264
251
|
content?: string | null;
|
|
265
252
|
author_id?: string | null;
|
|
266
253
|
/**
|
|
267
254
|
* Replaces the whole feature-lead set (`[]` clears it); omitted leaves it
|
|
268
255
|
* untouched. Display-only, so it rides the STANDING floor like the title —
|
|
269
|
-
* not the DRI-only levers
|
|
256
|
+
* not the DRI-only levers.
|
|
270
257
|
*/
|
|
271
258
|
feature_lead_ids?: string[];
|
|
272
259
|
links?: DesignDocLinkInput[];
|
|
@@ -296,8 +283,12 @@ export interface AddDesignDocCommentData {
|
|
|
296
283
|
title?: string | null;
|
|
297
284
|
body: string;
|
|
298
285
|
}
|
|
286
|
+
/** The dashboard's readiness filter (`?ready=`). */
|
|
287
|
+
export type DesignDocReadyFilter = 'ready' | 'not_ready';
|
|
299
288
|
export interface DesignDocFilters {
|
|
300
|
-
|
|
289
|
+
ready?: DesignDocReadyFilter;
|
|
290
|
+
/** One or more `spec_mode` values (CSV on the wire). */
|
|
291
|
+
spec_mode?: string;
|
|
301
292
|
search?: string;
|
|
302
293
|
mine?: 'open';
|
|
303
294
|
limit?: number;
|
|
@@ -306,17 +297,17 @@ export interface DesignDocFilters {
|
|
|
306
297
|
export interface DesignDocListResponse {
|
|
307
298
|
data: DesignDoc[];
|
|
308
299
|
count: number;
|
|
309
|
-
/** Server-computed
|
|
300
|
+
/** Server-computed spec-mode counts over the scope, MINUS the spec-mode
|
|
301
|
+
* filter itself — so a filtered row still shows what the other value holds. */
|
|
310
302
|
facets: {
|
|
311
|
-
|
|
303
|
+
spec_mode: Record<string, number>;
|
|
312
304
|
};
|
|
313
305
|
}
|
|
314
306
|
export interface DesignDocStats {
|
|
315
307
|
total: number;
|
|
316
|
-
/**
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
by_status: Record<string, number>;
|
|
308
|
+
/** Docs whose every section is signed off with no open blocking comment. */
|
|
309
|
+
ready: number;
|
|
310
|
+
not_ready: number;
|
|
320
311
|
waiting_on_me_docs: number;
|
|
321
312
|
waiting_on_me_tasks: number;
|
|
322
313
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-doc.d.ts","sourceRoot":"","sources":["../../src/types/design-doc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"design-doc.d.ts","sourceRoot":"","sources":["../../src/types/design-doc.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK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CAAC;CACd;AAED,oDAAoD;AACpD,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,WAAW,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd;oFACgF;IAChF,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
package/package.json
CHANGED
package/src/types/design-doc.ts
CHANGED
|
@@ -3,9 +3,26 @@
|
|
|
3
3
|
//
|
|
4
4
|
// Participant sections are keyed by the employee DEPARTMENT (FK to the ONE
|
|
5
5
|
// `departments` table — see department.ts); there is no function enum.
|
|
6
|
-
//
|
|
6
|
+
// A doc has no status: it is READY when every section is signed off and no
|
|
7
|
+
// blocking comment is open. That math lives in the hub's
|
|
7
8
|
// `lib/utils/design-doc-gate.ts` (isomorphic, shared by server + client).
|
|
8
9
|
|
|
10
|
+
// MIGRATION NOTE (2026-09-11). This file dropped `status`, `DesignDocStatus`,
|
|
11
|
+
// `DesignDocStatusTransition`, `approved_at`, `dri_vacated_by`, `by_status` and
|
|
12
|
+
// `facets.status`, and added `spec_mode`. Two things a reader will ask:
|
|
13
|
+
//
|
|
14
|
+
// · LOCKSTEP — the hub is the ONLY consumer. Nothing else in this package
|
|
15
|
+
// references those names, and neither does the sibling oss-frontend
|
|
16
|
+
// checkout; every hub reference moves in multi-platform-hub#1257, which
|
|
17
|
+
// merges after this package is released and the hub's pin bumped.
|
|
18
|
+
// · `dri_vacated_by` was already VESTIGIAL, so removing it drops no live
|
|
19
|
+
// protection. It existed for an anti-self-serve rule — a DRI who also held
|
|
20
|
+
// management could not vacate the seat, act as a "third party" and approve
|
|
21
|
+
// their own doc — that was removed earlier by product decision, and no
|
|
22
|
+
// database column ever backed the field. There is no approval step left to
|
|
23
|
+
// protect: readiness is DERIVED from the department sign-offs, so there is
|
|
24
|
+
// no seat to vacate and nothing to self-approve.
|
|
25
|
+
|
|
9
26
|
import type { RoadmapItem } from '../components/chat/types/entities/roadmap-item';
|
|
10
27
|
import type { DeliveryItem } from './delivery';
|
|
11
28
|
import type { DepartmentRef } from './department';
|
|
@@ -15,12 +32,12 @@ import type { EntityAuthor } from './entity-author';
|
|
|
15
32
|
// ---------------------------------------------------------------------------
|
|
16
33
|
// Value vocabularies — DATA, not source code.
|
|
17
34
|
//
|
|
18
|
-
// Every enumerable design-doc value (
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
35
|
+
// Every enumerable design-doc value (tier, spec mode, participant status, comment
|
|
36
|
+
// type/status, link type, media type) is a row in the `design_doc_vocabulary`
|
|
37
|
+
// table, with its label, badge colour, display order and the semantic ROLES it
|
|
38
|
+
// claims. Nothing here lists members: a union of literals would be a second,
|
|
39
|
+
// stale copy of that table and would make adding a value a deploy instead of an
|
|
40
|
+
// INSERT.
|
|
24
41
|
//
|
|
25
42
|
// What stays in code is the CAPABILITY vocabulary — the role names the gate
|
|
26
43
|
// understands and the renderers a link type can bind to (both declared in the
|
|
@@ -36,7 +53,7 @@ import type { EntityAuthor } from './entity-author';
|
|
|
36
53
|
/** One value of `design_doc_vocabulary.kind` — the STRUCTURAL list (one per
|
|
37
54
|
* value column), the only design-doc vocabulary that is code. */
|
|
38
55
|
export type DesignDocVocabularyKind =
|
|
39
|
-
'
|
|
56
|
+
'tier' | 'spec_mode' | 'participant_status' | 'comment_type' | 'comment_status' | 'link_type' | 'media_type';
|
|
40
57
|
|
|
41
58
|
/** A `design_doc_vocabulary` row, as the DAL and the vocabulary API return it. */
|
|
42
59
|
export interface DesignDocVocabularyOption {
|
|
@@ -47,13 +64,13 @@ export interface DesignDocVocabularyOption {
|
|
|
47
64
|
/** A `StatusBadge` colorScheme name (validated against the badge's own union
|
|
48
65
|
* when the hub reads the row — an unknown scheme degrades to 'default'). */
|
|
49
66
|
color_scheme: string;
|
|
50
|
-
/** Human copy for surfaces that
|
|
51
|
-
*
|
|
67
|
+
/** Human copy for surfaces that EXPLAIN a value rather than just naming it —
|
|
68
|
+
* the spec-mode picker's per-option hint. Display only. */
|
|
52
69
|
description: string | null;
|
|
53
70
|
display_order: number;
|
|
54
71
|
is_active: boolean;
|
|
55
|
-
/** Engine capabilities this member claims (`complete`, `
|
|
56
|
-
*
|
|
72
|
+
/** Engine capabilities this member claims (`complete`, `blocks_ready`, …).
|
|
73
|
+
* The names live in the hub's gate module. */
|
|
57
74
|
roles: string[];
|
|
58
75
|
/** link_type only: which renderer previews it. */
|
|
59
76
|
render: DesignDocLinkRender | null;
|
|
@@ -64,35 +81,22 @@ export interface DesignDocVocabularyOption {
|
|
|
64
81
|
/** link_type only: where the artifact comes from, shown beside the label. */
|
|
65
82
|
source: string | null;
|
|
66
83
|
placeholder: string | null;
|
|
67
|
-
/** status only: the verb on the button that moves a doc INTO this status. */
|
|
68
|
-
action_label: string | null;
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
/** How the doc page previews a link type. A CAPABILITY (each key is a
|
|
72
87
|
* component in the renderer), so this one IS code — a DB row binds to it. */
|
|
73
88
|
export type DesignDocLinkRender = 'task' | 'figma' | 'claude' | 'link';
|
|
74
89
|
|
|
75
|
-
/**
|
|
76
|
-
export interface DesignDocStatusTransition {
|
|
77
|
-
from: string;
|
|
78
|
-
to: string;
|
|
79
|
-
/** From-specific button copy when it differs from the target's verb
|
|
80
|
-
* (`abandoned -> draft` reads "Reopen", not "Back to draft"). */
|
|
81
|
-
action_label: string | null;
|
|
82
|
-
display_order: number;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** The whole vocabulary in one payload — what every surface (server gate,
|
|
90
|
+
/** The whole vocabulary in one payload — what every surface (server rules,
|
|
86
91
|
* client badges, pickers, validators) reads instead of a literal list. */
|
|
87
92
|
export interface DesignDocVocabulary {
|
|
88
93
|
options: DesignDocVocabularyOption[];
|
|
89
|
-
transitions: DesignDocStatusTransition[];
|
|
90
94
|
}
|
|
91
95
|
|
|
92
|
-
/** A `design_doc_vocabulary.value` of kind `status`. */
|
|
93
|
-
export type DesignDocStatus = string;
|
|
94
96
|
/** A `design_doc_vocabulary.value` of kind `tier`. */
|
|
95
97
|
export type DesignDocTier = string;
|
|
98
|
+
/** A `design_doc_vocabulary.value` of kind `spec_mode`. */
|
|
99
|
+
export type DesignDocSpecMode = string;
|
|
96
100
|
/** A `design_doc_vocabulary.value` of kind `participant_status`. */
|
|
97
101
|
export type DesignDocParticipantStatus = string;
|
|
98
102
|
/** A `design_doc_vocabulary.value` of kind `comment_type`. */
|
|
@@ -159,7 +163,7 @@ export interface DesignDocMedia {
|
|
|
159
163
|
|
|
160
164
|
/**
|
|
161
165
|
* A comment. ROOT comments (`parent_comment_id === null`) carry `comment_type`
|
|
162
|
-
* + `status` and
|
|
166
|
+
* + `status` and keep the doc from being ready when `blocking` + `open`; REPLIES carry neither
|
|
163
167
|
* (single-level threads — a reply to a reply is re-parented to the root).
|
|
164
168
|
*/
|
|
165
169
|
export interface DesignDocComment {
|
|
@@ -224,19 +228,15 @@ export interface DesignDoc {
|
|
|
224
228
|
title: string;
|
|
225
229
|
slug: string;
|
|
226
230
|
tier: DesignDocTier;
|
|
231
|
+
/**
|
|
232
|
+
* How much of the solution is knowable before build starts — spec-first
|
|
233
|
+
* (settled up front) or discovery-first (engineering resolves the design
|
|
234
|
+
* while building). A LABEL on the doc: no rule reads it.
|
|
235
|
+
*/
|
|
236
|
+
spec_mode: DesignDocSpecMode;
|
|
227
237
|
summary: string | null;
|
|
228
238
|
content: string | null;
|
|
229
|
-
status: DesignDocStatus;
|
|
230
239
|
author_id: string | null;
|
|
231
|
-
/**
|
|
232
|
-
* EVERYONE who has handed the DRI role away on this doc (appended, never
|
|
233
|
-
* overwritten). The third-party break-glass excludes all of them: a DRI who
|
|
234
|
-
* also holds management could otherwise vacate the seat, act as a "third
|
|
235
|
-
* party" on their own doc and approve it alone — and with a single scalar,
|
|
236
|
-
* simply hand the seat on twice to erase the memory of their own vacating.
|
|
237
|
-
*/
|
|
238
|
-
dri_vacated_by: string[];
|
|
239
|
-
approved_at: string | null;
|
|
240
240
|
created_at: string;
|
|
241
241
|
updated_at: string;
|
|
242
242
|
/** DRI, hydrated via the shared author hydrator. */
|
|
@@ -245,8 +245,8 @@ export interface DesignDoc {
|
|
|
245
245
|
* Engineering feature leads — the people reviewing the doc alongside the
|
|
246
246
|
* department sign-off sections. DISPLAY-ONLY attribution, like
|
|
247
247
|
* `how_i_work_participants`: being listed grants NO rights (nothing in the
|
|
248
|
-
* hub's `design-doc-gate.ts` reads it) and is NOT an input to
|
|
249
|
-
*
|
|
248
|
+
* hub's `design-doc-gate.ts` reads it) and is NOT an input to readiness.
|
|
249
|
+
* The doc-level owner with actual levers is the DRI (`author_id`).
|
|
250
250
|
*
|
|
251
251
|
* Carried on BOTH the list and the detail payload — the dashboard renders
|
|
252
252
|
* their avatars in its own column.
|
|
@@ -296,6 +296,8 @@ export interface CreateDesignDocData {
|
|
|
296
296
|
title: string;
|
|
297
297
|
slug: string;
|
|
298
298
|
tier: DesignDocTier;
|
|
299
|
+
/** Defaults to the `spec_mode` row claiming `default` when omitted. */
|
|
300
|
+
spec_mode?: DesignDocSpecMode;
|
|
299
301
|
summary?: string | null;
|
|
300
302
|
/** Spec markdown (Why / What / How); the create screen carries the same body editor as edit. */
|
|
301
303
|
content?: string | null;
|
|
@@ -308,20 +310,21 @@ export interface CreateDesignDocData {
|
|
|
308
310
|
}
|
|
309
311
|
|
|
310
312
|
/**
|
|
311
|
-
* Doc-level allowlist (PUT). `
|
|
312
|
-
*
|
|
313
|
+
* Doc-level allowlist (PUT). `participants` are NOT here — they only move
|
|
314
|
+
* through their own routes.
|
|
313
315
|
*/
|
|
314
316
|
export interface UpdateDesignDocData {
|
|
315
317
|
title?: string;
|
|
316
318
|
slug?: string;
|
|
317
319
|
tier?: DesignDocTier;
|
|
320
|
+
spec_mode?: DesignDocSpecMode;
|
|
318
321
|
summary?: string | null;
|
|
319
322
|
content?: string | null;
|
|
320
323
|
author_id?: string | null;
|
|
321
324
|
/**
|
|
322
325
|
* Replaces the whole feature-lead set (`[]` clears it); omitted leaves it
|
|
323
326
|
* untouched. Display-only, so it rides the STANDING floor like the title —
|
|
324
|
-
* not the DRI-only levers
|
|
327
|
+
* not the DRI-only levers.
|
|
325
328
|
*/
|
|
326
329
|
feature_lead_ids?: string[];
|
|
327
330
|
links?: DesignDocLinkInput[];
|
|
@@ -355,8 +358,13 @@ export interface AddDesignDocCommentData {
|
|
|
355
358
|
body: string;
|
|
356
359
|
}
|
|
357
360
|
|
|
361
|
+
/** The dashboard's readiness filter (`?ready=`). */
|
|
362
|
+
export type DesignDocReadyFilter = 'ready' | 'not_ready';
|
|
363
|
+
|
|
358
364
|
export interface DesignDocFilters {
|
|
359
|
-
|
|
365
|
+
ready?: DesignDocReadyFilter;
|
|
366
|
+
/** One or more `spec_mode` values (CSV on the wire). */
|
|
367
|
+
spec_mode?: string;
|
|
360
368
|
search?: string;
|
|
361
369
|
mine?: 'open';
|
|
362
370
|
limit?: number;
|
|
@@ -366,16 +374,16 @@ export interface DesignDocFilters {
|
|
|
366
374
|
export interface DesignDocListResponse {
|
|
367
375
|
data: DesignDoc[];
|
|
368
376
|
count: number;
|
|
369
|
-
/** Server-computed
|
|
370
|
-
|
|
377
|
+
/** Server-computed spec-mode counts over the scope, MINUS the spec-mode
|
|
378
|
+
* filter itself — so a filtered row still shows what the other value holds. */
|
|
379
|
+
facets: { spec_mode: Record<string, number> };
|
|
371
380
|
}
|
|
372
381
|
|
|
373
382
|
export interface DesignDocStats {
|
|
374
383
|
total: number;
|
|
375
|
-
/**
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
by_status: Record<string, number>;
|
|
384
|
+
/** Docs whose every section is signed off with no open blocking comment. */
|
|
385
|
+
ready: number;
|
|
386
|
+
not_ready: number;
|
|
379
387
|
waiting_on_me_docs: number;
|
|
380
388
|
waiting_on_me_tasks: number;
|
|
381
389
|
}
|