Feedback page: results, responses, who hasn't answered, reminders (2.1.0)
- Supervisor -> Feedback (supervisors and admins, campus-scoped): every event's form with answered of asked, response rate, average rating and last reminder; per event the results per question (with the AI summary), each response, and on named forms who was asked and who has answered. - Remind those who haven't answered (or one person on a named form): a fresh link, plus the form to anyone eligible who hasn't had it; nobody gets the form or a reminder twice within 24 hours. The 3-day job is unchanged. - Anonymous forms show no names and no list of who has answered. - FeedbackInvite.reminderCount (migration 20261103120000_feedback_reminders); access log action feedback_responses; help page; dashboard and Ctrl+K links. - Roadmap: the AI helpers on the privacy pages are dropped; 2.1.0 is the feedback page. - Tests: tests/feedbackPage.test.ts, e2e/feedback.spec.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+341
@@ -7236,6 +7236,72 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/feedback": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Every event with a feedback form
|
||||
* @description Newest event first, with how many were asked and answered, and the average star rating.
|
||||
*
|
||||
* **Who:** Supervisors and admins.
|
||||
*/
|
||||
get: operations["getFeedback"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/events/{id}/feedback/results": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* An event's feedback: results, responses and who was asked
|
||||
* @description On an anonymous form, responses have no name and `people` is null. Opening a named form's answers is recorded in the access log.
|
||||
*
|
||||
* **Who:** Supervisors and admins.
|
||||
*/
|
||||
get: operations["getEventsIdFeedbackResults"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/events/{id}/feedback/remind": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
/**
|
||||
* Remind people who haven't answered
|
||||
* @description A fresh link to everyone who hasn't answered, or to `userIds` (named forms only). Nobody is sent the form or a reminder twice within 24 hours. Without `userIds` it also sends the form to anyone who has become eligible since it went out.
|
||||
*
|
||||
* **Who:** Supervisors and admins.
|
||||
*/
|
||||
post: operations["postEventsIdFeedbackRemind"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
}
|
||||
export type webhooks = Record<string, never>;
|
||||
export interface components {
|
||||
@@ -38294,4 +38360,279 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
getFeedback: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description OK */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
data: {
|
||||
event: {
|
||||
id: string;
|
||||
title: string;
|
||||
startDate: unknown;
|
||||
endDate: unknown;
|
||||
};
|
||||
/**
|
||||
* @description sent, scheduled (a send time is set) or not_scheduled
|
||||
* @enum {string}
|
||||
*/
|
||||
status: "sent" | "scheduled" | "not_scheduled";
|
||||
sendAt: unknown | null;
|
||||
sentAt: unknown | null;
|
||||
anonymous: boolean;
|
||||
invited: number;
|
||||
answered: number;
|
||||
/** @description % */
|
||||
responseRate: number | null;
|
||||
/** @description Every star rating on the form, 1–5 */
|
||||
averageRating: number | null;
|
||||
lastReminderAt: unknown | null;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Not signed in (UNAUTHENTICATED) */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not allowed for this role (FORBIDDEN) */
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
getEventsIdFeedbackResults: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
/** @description The id */
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description OK */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
data: {
|
||||
event: {
|
||||
id: string;
|
||||
title: string;
|
||||
startDate: unknown;
|
||||
endDate: unknown;
|
||||
};
|
||||
form: {
|
||||
/**
|
||||
* @description sent, scheduled (a send time is set) or not_scheduled
|
||||
* @enum {string}
|
||||
*/
|
||||
status: "sent" | "scheduled" | "not_scheduled";
|
||||
sendAt: unknown | null;
|
||||
sentAt: unknown | null;
|
||||
/** @enum {string} */
|
||||
audience: "checked_in" | "all";
|
||||
anonymous: boolean;
|
||||
intro: string | null;
|
||||
/** @description When the automatic reminder goes (3 days after sending) */
|
||||
autoReminderAt: unknown | null;
|
||||
autoReminderSent: boolean;
|
||||
};
|
||||
counts: {
|
||||
invited: number;
|
||||
answered: number;
|
||||
notAnswered: number;
|
||||
responseRate: number | null;
|
||||
/** @description Not answered, and not sent the form or a reminder in the last 24 hours */
|
||||
canRemind: number;
|
||||
remindedRecently: number;
|
||||
/** @description Would get the form but haven't been sent it yet (e.g. checked in after it went out) */
|
||||
waiting: number;
|
||||
};
|
||||
averageRating: number | null;
|
||||
questions: {
|
||||
fieldId: string;
|
||||
type: string;
|
||||
label: string;
|
||||
answered: number;
|
||||
average?: number | null;
|
||||
distribution?: {
|
||||
label: string;
|
||||
value: number;
|
||||
}[];
|
||||
counts?: {
|
||||
label: string;
|
||||
value: number;
|
||||
}[];
|
||||
texts?: {
|
||||
value: string;
|
||||
name?: string;
|
||||
}[];
|
||||
}[];
|
||||
fields: {
|
||||
id: string;
|
||||
type: string;
|
||||
label: string;
|
||||
}[];
|
||||
responses: {
|
||||
id: string;
|
||||
createdAt: unknown;
|
||||
name: string | null;
|
||||
/** @description Question id → answer */
|
||||
answers: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}[];
|
||||
people: {
|
||||
userId: string;
|
||||
name: string;
|
||||
email: string | null;
|
||||
phoneNumber: string | null;
|
||||
sentAt: unknown;
|
||||
remindedAt: unknown | null;
|
||||
reminderCount: number;
|
||||
respondedAt: unknown | null;
|
||||
canRemind: boolean;
|
||||
}[] | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Validation failed (VALIDATION_FAILED) */
|
||||
400: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not signed in (UNAUTHENTICATED) */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not allowed for this role (FORBIDDEN) */
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not found (NOT_FOUND) */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
postEventsIdFeedbackRemind: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
/** @description The id */
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
/** @description Only these people (named forms) */
|
||||
userIds?: string[] | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
data: {
|
||||
reminded: number;
|
||||
newlyInvited: number;
|
||||
skipped: number;
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Validation failed (VALIDATION_FAILED) */
|
||||
400: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not signed in (UNAUTHENTICATED) */
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not allowed for this role (FORBIDDEN) */
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
/** @description Not found (NOT_FOUND) */
|
||||
404: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["Error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user