@flamingo-stack/openframe-frontend-core 0.0.566-1861.5115.1 → 0.0.566
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 +68 -11
- package/dist/types/design-doc.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types/design-doc.ts +94 -21
|
@@ -3,13 +3,70 @@ import type { DeliveryItem } from './delivery';
|
|
|
3
3
|
import type { RoadmapItem } from '../components/chat/types/entities/roadmap-item';
|
|
4
4
|
import type { DepartmentRef } from './department';
|
|
5
5
|
import type { EmployeeDirectoryRow } from './employee';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
/** One value of `design_doc_vocabulary.kind` — the STRUCTURAL list (one per
|
|
7
|
+
* value column), the only design-doc vocabulary that is code. */
|
|
8
|
+
export type DesignDocVocabularyKind = 'status' | 'tier' | 'participant_status' | 'comment_type' | 'comment_status' | 'link_type' | 'media_type';
|
|
9
|
+
/** A `design_doc_vocabulary` row, as the DAL and the vocabulary API return it. */
|
|
10
|
+
export interface DesignDocVocabularyOption {
|
|
11
|
+
id: number;
|
|
12
|
+
kind: DesignDocVocabularyKind;
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
/** A `StatusBadge` colorScheme name (validated against the badge's own union
|
|
16
|
+
* when the hub reads the row — an unknown scheme degrades to 'default'). */
|
|
17
|
+
color_scheme: string;
|
|
18
|
+
/** Human copy for surfaces that explain a value rather than just naming it
|
|
19
|
+
* (the dashboard's stat tiles). */
|
|
20
|
+
description: string | null;
|
|
21
|
+
display_order: number;
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
/** Engine capabilities this member claims (`complete`, `blocks_approval`,
|
|
24
|
+
* `locked`, …). The names live in the hub's gate module. */
|
|
25
|
+
roles: string[];
|
|
26
|
+
/** link_type only: which renderer previews it. */
|
|
27
|
+
render: DesignDocLinkRender | null;
|
|
28
|
+
/** link_type only: the markdown shortcode that embeds it, and whether that
|
|
29
|
+
* shortcode takes the author's `|title`. */
|
|
30
|
+
embed_shortcode: string | null;
|
|
31
|
+
embed_with_title: boolean;
|
|
32
|
+
/** link_type only: where the artifact comes from, shown beside the label. */
|
|
33
|
+
source: string | null;
|
|
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
|
+
}
|
|
38
|
+
/** How the doc page previews a link type. A CAPABILITY (each key is a
|
|
39
|
+
* component in the renderer), so this one IS code — a DB row binds to it. */
|
|
40
|
+
export type DesignDocLinkRender = 'task' | 'figma' | 'claude' | 'link';
|
|
41
|
+
/** One legal status move, resolved to values by the DAL. */
|
|
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,
|
|
51
|
+
* client badges, pickers, validators) reads instead of a literal list. */
|
|
52
|
+
export interface DesignDocVocabulary {
|
|
53
|
+
options: DesignDocVocabularyOption[];
|
|
54
|
+
transitions: DesignDocStatusTransition[];
|
|
55
|
+
}
|
|
56
|
+
/** A `design_doc_vocabulary.value` of kind `status`. */
|
|
57
|
+
export type DesignDocStatus = string;
|
|
58
|
+
/** A `design_doc_vocabulary.value` of kind `tier`. */
|
|
59
|
+
export type DesignDocTier = string;
|
|
60
|
+
/** A `design_doc_vocabulary.value` of kind `participant_status`. */
|
|
61
|
+
export type DesignDocParticipantStatus = string;
|
|
62
|
+
/** A `design_doc_vocabulary.value` of kind `comment_type`. */
|
|
63
|
+
export type DesignDocCommentType = string;
|
|
64
|
+
/** A `design_doc_vocabulary.value` of kind `comment_status`. */
|
|
65
|
+
export type DesignDocCommentStatus = string;
|
|
66
|
+
/** A `design_doc_vocabulary.value` of kind `link_type`. */
|
|
67
|
+
export type DesignDocLinkType = string;
|
|
68
|
+
/** A `design_doc_vocabulary.value` of kind `media_type`. */
|
|
69
|
+
export type DesignDocMediaType = string;
|
|
13
70
|
/**
|
|
14
71
|
* The profile identity the DAL embeds on participants / comment authors — THE
|
|
15
72
|
* shared person projection, not a second declaration of it. `email` rides the
|
|
@@ -237,10 +294,10 @@ export interface DesignDocListResponse {
|
|
|
237
294
|
}
|
|
238
295
|
export interface DesignDocStats {
|
|
239
296
|
total: number;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
297
|
+
/** One count per `status` vocabulary row (zeros included), keyed by value —
|
|
298
|
+
* never a fixed set of named keys, so a status added to the table gets a
|
|
299
|
+
* tile without a type change. */
|
|
300
|
+
by_status: Record<string, number>;
|
|
244
301
|
waiting_on_me_docs: number;
|
|
245
302
|
waiting_on_me_tasks: number;
|
|
246
303
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-doc.d.ts","sourceRoot":"","sources":["../../src/types/design-doc.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAA;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"design-doc.d.ts","sourceRoot":"","sources":["../../src/types/design-doc.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,Y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AC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,qDAAqD;IACrD,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAA;CAC3C;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb;;sCAEkC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,mBAAmB,EAAE,MAAM,CAAA;CAC5B"}
|
package/package.json
CHANGED
package/src/types/design-doc.ts
CHANGED
|
@@ -13,29 +13,102 @@ import type { DepartmentRef } from './department'
|
|
|
13
13
|
import type { EmployeeDirectoryRow } from './employee'
|
|
14
14
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
|
-
// Value vocabularies —
|
|
16
|
+
// Value vocabularies — DATA, not source code.
|
|
17
17
|
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
// an
|
|
18
|
+
// Every enumerable design-doc value (doc status, tier, participant status,
|
|
19
|
+
// comment type/status, link type, media type) is a row in the
|
|
20
|
+
// `design_doc_vocabulary` table, with its label, badge colour, display order
|
|
21
|
+
// and the semantic ROLES it claims. Nothing here lists members: a union of
|
|
22
|
+
// literals would be a second, stale copy of that table and would make adding a
|
|
23
|
+
// status a deploy instead of an INSERT.
|
|
24
|
+
//
|
|
25
|
+
// What stays in code is the CAPABILITY vocabulary — the role names the gate
|
|
26
|
+
// understands and the renderers a link type can bind to (both declared in the
|
|
27
|
+
// hub's `lib/utils/design-doc-gate.ts`). A row participates by CLAIMING a
|
|
28
|
+
// capability; no engine rule ever names a value.
|
|
29
|
+
//
|
|
30
|
+
// The aliases below are documentation, not constraints: they mark which
|
|
31
|
+
// vocabulary a string belongs to. Values are validated at the edge (the DAL
|
|
32
|
+
// checks membership against the live table) and by the database itself (each
|
|
33
|
+
// value column carries a composite FK into `design_doc_vocabulary`).
|
|
24
34
|
// ---------------------------------------------------------------------------
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
/** One value of `design_doc_vocabulary.kind` — the STRUCTURAL list (one per
|
|
37
|
+
* value column), the only design-doc vocabulary that is code. */
|
|
38
|
+
export type DesignDocVocabularyKind =
|
|
39
|
+
| 'status'
|
|
40
|
+
| 'tier'
|
|
41
|
+
| 'participant_status'
|
|
42
|
+
| 'comment_type'
|
|
43
|
+
| 'comment_status'
|
|
44
|
+
| 'link_type'
|
|
45
|
+
| 'media_type'
|
|
46
|
+
|
|
47
|
+
/** A `design_doc_vocabulary` row, as the DAL and the vocabulary API return it. */
|
|
48
|
+
export interface DesignDocVocabularyOption {
|
|
49
|
+
id: number
|
|
50
|
+
kind: DesignDocVocabularyKind
|
|
51
|
+
value: string
|
|
52
|
+
label: string
|
|
53
|
+
/** A `StatusBadge` colorScheme name (validated against the badge's own union
|
|
54
|
+
* when the hub reads the row — an unknown scheme degrades to 'default'). */
|
|
55
|
+
color_scheme: string
|
|
56
|
+
/** Human copy for surfaces that explain a value rather than just naming it
|
|
57
|
+
* (the dashboard's stat tiles). */
|
|
58
|
+
description: string | null
|
|
59
|
+
display_order: number
|
|
60
|
+
is_active: boolean
|
|
61
|
+
/** Engine capabilities this member claims (`complete`, `blocks_approval`,
|
|
62
|
+
* `locked`, …). The names live in the hub's gate module. */
|
|
63
|
+
roles: string[]
|
|
64
|
+
/** link_type only: which renderer previews it. */
|
|
65
|
+
render: DesignDocLinkRender | null
|
|
66
|
+
/** link_type only: the markdown shortcode that embeds it, and whether that
|
|
67
|
+
* shortcode takes the author's `|title`. */
|
|
68
|
+
embed_shortcode: string | null
|
|
69
|
+
embed_with_title: boolean
|
|
70
|
+
/** link_type only: where the artifact comes from, shown beside the label. */
|
|
71
|
+
source: string | null
|
|
72
|
+
placeholder: string | null
|
|
73
|
+
/** status only: the verb on the button that moves a doc INTO this status. */
|
|
74
|
+
action_label: string | null
|
|
75
|
+
}
|
|
33
76
|
|
|
34
|
-
|
|
77
|
+
/** How the doc page previews a link type. A CAPABILITY (each key is a
|
|
78
|
+
* component in the renderer), so this one IS code — a DB row binds to it. */
|
|
79
|
+
export type DesignDocLinkRender = 'task' | 'figma' | 'claude' | 'link'
|
|
80
|
+
|
|
81
|
+
/** One legal status move, resolved to values by the DAL. */
|
|
82
|
+
export interface DesignDocStatusTransition {
|
|
83
|
+
from: string
|
|
84
|
+
to: string
|
|
85
|
+
/** From-specific button copy when it differs from the target's verb
|
|
86
|
+
* (`abandoned -> draft` reads "Reopen", not "Back to draft"). */
|
|
87
|
+
action_label: string | null
|
|
88
|
+
display_order: number
|
|
89
|
+
}
|
|
35
90
|
|
|
36
|
-
|
|
91
|
+
/** The whole vocabulary in one payload — what every surface (server gate,
|
|
92
|
+
* client badges, pickers, validators) reads instead of a literal list. */
|
|
93
|
+
export interface DesignDocVocabulary {
|
|
94
|
+
options: DesignDocVocabularyOption[]
|
|
95
|
+
transitions: DesignDocStatusTransition[]
|
|
96
|
+
}
|
|
37
97
|
|
|
38
|
-
|
|
98
|
+
/** A `design_doc_vocabulary.value` of kind `status`. */
|
|
99
|
+
export type DesignDocStatus = string
|
|
100
|
+
/** A `design_doc_vocabulary.value` of kind `tier`. */
|
|
101
|
+
export type DesignDocTier = string
|
|
102
|
+
/** A `design_doc_vocabulary.value` of kind `participant_status`. */
|
|
103
|
+
export type DesignDocParticipantStatus = string
|
|
104
|
+
/** A `design_doc_vocabulary.value` of kind `comment_type`. */
|
|
105
|
+
export type DesignDocCommentType = string
|
|
106
|
+
/** A `design_doc_vocabulary.value` of kind `comment_status`. */
|
|
107
|
+
export type DesignDocCommentStatus = string
|
|
108
|
+
/** A `design_doc_vocabulary.value` of kind `link_type`. */
|
|
109
|
+
export type DesignDocLinkType = string
|
|
110
|
+
/** A `design_doc_vocabulary.value` of kind `media_type`. */
|
|
111
|
+
export type DesignDocMediaType = string
|
|
39
112
|
|
|
40
113
|
// ---------------------------------------------------------------------------
|
|
41
114
|
// Rows (as returned by the hub DAL — hydrated)
|
|
@@ -286,10 +359,10 @@ export interface DesignDocListResponse {
|
|
|
286
359
|
|
|
287
360
|
export interface DesignDocStats {
|
|
288
361
|
total: number
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
362
|
+
/** One count per `status` vocabulary row (zeros included), keyed by value —
|
|
363
|
+
* never a fixed set of named keys, so a status added to the table gets a
|
|
364
|
+
* tile without a type change. */
|
|
365
|
+
by_status: Record<string, number>
|
|
293
366
|
waiting_on_me_docs: number
|
|
294
367
|
waiting_on_me_tasks: number
|
|
295
368
|
}
|