heartraite 1.0.196 → 1.0.197
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/ca.types.d.ts +16 -0
- package/package.json +1 -1
- package/src/types/ca.types.ts +17 -0
package/dist/types/ca.types.d.ts
CHANGED
|
@@ -4,6 +4,17 @@ type QuestionId = string;
|
|
|
4
4
|
type CategoryId = string;
|
|
5
5
|
type ScoreAmount = number;
|
|
6
6
|
export type Score = Record<QuestionId, ScoreAmount>;
|
|
7
|
+
/**
|
|
8
|
+
* Per-category edit bookkeeping for post-completion CA edits. Written by the
|
|
9
|
+
* backend on each category edit; read by the frontend to render per-category
|
|
10
|
+
* edit availability ("can update once" vs "already updated"). Shared shape.
|
|
11
|
+
*/
|
|
12
|
+
export type CategoryEditMeta = {
|
|
13
|
+
/** How many times this category has been edited (post-completion). */
|
|
14
|
+
editCount: number;
|
|
15
|
+
/** ISO timestamp of the most recent edit. */
|
|
16
|
+
lastEditedAt: string;
|
|
17
|
+
};
|
|
7
18
|
export type CA = {
|
|
8
19
|
created: string;
|
|
9
20
|
userId: string;
|
|
@@ -12,6 +23,11 @@ export type CA = {
|
|
|
12
23
|
categoryEvaluations: Record<CategoryId, CategoryEvaluation>;
|
|
13
24
|
lastUpdated?: string;
|
|
14
25
|
firstAnsweredAt?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Per-category edit counters (categoryId -> meta). Absent until a category has
|
|
28
|
+
* been edited post-completion. Backend-owned; frontend reads for availability.
|
|
29
|
+
*/
|
|
30
|
+
editMeta?: Record<CategoryId, CategoryEditMeta>;
|
|
15
31
|
};
|
|
16
32
|
export type Personality = {
|
|
17
33
|
[PersonalityTrait.OPENNESS]: number;
|
package/package.json
CHANGED
package/src/types/ca.types.ts
CHANGED
|
@@ -7,6 +7,18 @@ type ScoreAmount = number;
|
|
|
7
7
|
|
|
8
8
|
export type Score = Record<QuestionId, ScoreAmount>;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Per-category edit bookkeeping for post-completion CA edits. Written by the
|
|
12
|
+
* backend on each category edit; read by the frontend to render per-category
|
|
13
|
+
* edit availability ("can update once" vs "already updated"). Shared shape.
|
|
14
|
+
*/
|
|
15
|
+
export type CategoryEditMeta = {
|
|
16
|
+
/** How many times this category has been edited (post-completion). */
|
|
17
|
+
editCount: number;
|
|
18
|
+
/** ISO timestamp of the most recent edit. */
|
|
19
|
+
lastEditedAt: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
10
22
|
export type CA = {
|
|
11
23
|
created: string;
|
|
12
24
|
userId: string;
|
|
@@ -15,6 +27,11 @@ export type CA = {
|
|
|
15
27
|
categoryEvaluations: Record<CategoryId, CategoryEvaluation>;
|
|
16
28
|
lastUpdated?: string;
|
|
17
29
|
firstAnsweredAt?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Per-category edit counters (categoryId -> meta). Absent until a category has
|
|
32
|
+
* been edited post-completion. Backend-owned; frontend reads for availability.
|
|
33
|
+
*/
|
|
34
|
+
editMeta?: Record<CategoryId, CategoryEditMeta>;
|
|
18
35
|
};
|
|
19
36
|
|
|
20
37
|
export type Personality = {
|