@orakl/shared 0.3.1 → 0.4.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.
@@ -37,11 +37,11 @@ const POWERS = {
37
37
  },
38
38
  "can-moderate-questions": {
39
39
  shape: "gate",
40
- description: "Opens the review queue for player-reported questions, at /manage/flagged-questions.",
40
+ description: "Opens the review queue for player-reported questions, at /manage/flagged-questions, and the question ratings page, at /manage/question-ratings.",
41
41
  },
42
42
  "can-publish-questions": {
43
43
  shape: "gate",
44
- description: "Opens the authored-questions dashboard at /manage/questions and promotes questions into the shared bank, where every curator's games draw them, and withdraws them again.",
44
+ description: "Opens the authored-questions dashboard at /manage/questions and promotes questions into the shared bank, where every curator's games draw them, and withdraws them again. Edits and deletes built-in and promoted questions from the question ratings page.",
45
45
  },
46
46
  "is-power-user": {
47
47
  shape: "display",
@@ -128,6 +128,11 @@ export declare const FLAG_REGISTRY: {
128
128
  default: false;
129
129
  description: string;
130
130
  };
131
+ QUESTION_RATING: {
132
+ tier: "db";
133
+ default: true;
134
+ description: string;
135
+ };
131
136
  };
132
137
  export type FeatureFlagName = keyof typeof FLAG_REGISTRY;
133
138
  /**
@@ -108,6 +108,14 @@ export const FLAG_REGISTRY = {
108
108
  default: false,
109
109
  description: "Role selection — the observer/player picker between games",
110
110
  },
111
+ // Question rating (map #1437, decision 14). Off hides the reveal thumbs in
112
+ // solo and multiplayer, makes the server ignore rate frames, and closes the
113
+ // ratings page and the curator library counts. Stored ratings stay.
114
+ QUESTION_RATING: {
115
+ tier: "db",
116
+ default: true,
117
+ description: "Question rating — reveal thumbs, ratings page, library counts",
118
+ },
111
119
  };
112
120
  /**
113
121
  * Code defaults keyed by flag name, derived from the registry. Kept as the
@@ -52,7 +52,9 @@ export type UserPower =
52
52
  | "can-manage-categories"
53
53
  /**
54
54
  * Replaces the role gate on review of player-reported questions:
55
- * `/manage/flagged-questions` and `/api/manage/flagged-questions/*`. Separate
55
+ * `/manage/flagged-questions` and `/api/manage/flagged-questions/*`, and on
56
+ * the question ratings page: `/manage/question-ratings` and
57
+ * `GET /api/manage/question-ratings`. Separate
56
58
  * from `can-manage-categories` — reviewing a report is not the same trust as
57
59
  * editing what every quiz draws from.
58
60
  */
@@ -64,11 +66,16 @@ export type UserPower =
64
66
  * `POST /api/manage/questions/[id]/publish`,
65
67
  * `POST /api/manage/questions/[id]/unpublish`,
66
68
  * `POST /api/manage/questions/[id]/republish`,
67
- * `POST /api/manage/questions/publish` and
68
- * `GET /api/manage/questions/[id]/revisions`. Every curator's questions,
69
+ * `POST /api/manage/questions/publish`,
70
+ * `GET /api/manage/questions/[id]/revisions`,
71
+ * `GET /api/manage/question-ratings/[id]`,
72
+ * `PATCH /api/manage/question-ratings/[id]` and
73
+ * `DELETE /api/manage/question-ratings/[id]`. Every curator's questions,
69
74
  * with their author; promotes one or several into the shared bank,
70
75
  * withdraws one, or reconfirms one an author edited since promotion; reads
71
- * a question's revision history with each edit's actor.
76
+ * a question's revision history with each edit's actor; edits a built-in or
77
+ * promoted question from the question ratings page, keeping the prior text
78
+ * as a revision under the editor, or deletes it for good.
72
79
  */
73
80
  | "can-publish-questions"
74
81
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orakl/shared",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Orakl runtime helpers shared by the web client and the engine.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "types": "./dist/index.d.ts",
19
19
  "dependencies": {
20
20
  "date-fns": "^4.4.0",
21
- "@orakl/protocol": "0.2.0"
21
+ "@orakl/protocol": "0.3.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^26.4.1",