wedance-shared 1.0.199 → 1.0.202
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/school.d.ts +43 -0
- package/package.json +1 -1
package/dist/types/school.d.ts
CHANGED
|
@@ -196,6 +196,49 @@ export type ClassSessionSummary = Pick<ClassSession, "id" | "classId" | "startsA
|
|
|
196
196
|
instructor?: SchoolStaffSummary | null;
|
|
197
197
|
secondaryInstructor?: SchoolStaffSummary | null;
|
|
198
198
|
};
|
|
199
|
+
/**
|
|
200
|
+
* The dancer-facing projections, served unauthenticated by `/school/public/*`.
|
|
201
|
+
*
|
|
202
|
+
* Deliberately narrower than the SchoolXSummary types above rather than reusing them:
|
|
203
|
+
* SchoolStaffSummary carries `email`, `roles`, `status` and `userId`, and publishing an
|
|
204
|
+
* instructor's address and Firebase uid on an open endpoint is exactly what these avoid.
|
|
205
|
+
*/
|
|
206
|
+
export type PublicStaffSummary = Pick<SchoolStaff, "id" | "firstName" | "lastName">;
|
|
207
|
+
export type PublicRoomSummary = Pick<SchoolRoom, "id" | "name" | "color">;
|
|
208
|
+
/**
|
|
209
|
+
* SchoolClassSummary minus `status` — a public list only ever contains active classes, so
|
|
210
|
+
* the field would carry no information — and plus `description`, which the class detail
|
|
211
|
+
* screen needs and which a second public route just for it would not be worth.
|
|
212
|
+
*/
|
|
213
|
+
export type PublicClassSummary = Pick<SchoolClass, "id" | "name" | "description" | "level" | "danceTags" | "format" | "capacity" | "capacityLead" | "capacityFollow" | "defaultClassDurationMinutes">;
|
|
214
|
+
/**
|
|
215
|
+
* One occurrence of a class as an unauthenticated caller sees it. Every capacity is already
|
|
216
|
+
* resolved server side, so a client never reads a raw override.
|
|
217
|
+
*/
|
|
218
|
+
export interface PublicClassSession {
|
|
219
|
+
id: string;
|
|
220
|
+
classId: string;
|
|
221
|
+
startsAt: string;
|
|
222
|
+
endsAt: string;
|
|
223
|
+
status: ClassSessionStatus;
|
|
224
|
+
locationName: string | null;
|
|
225
|
+
locationAddress: string | null;
|
|
226
|
+
/** capacityOverride ?? the class capacity. Null means unlimited. */
|
|
227
|
+
effectiveCapacity: number | null;
|
|
228
|
+
/** Null unless the class is partnered: only a partnered class has role pools. */
|
|
229
|
+
effectiveCapacityLead: number | null;
|
|
230
|
+
effectiveCapacityFollow: number | null;
|
|
231
|
+
/** Bookings holding a seat. Waitlisted rows hold none and are counted separately. */
|
|
232
|
+
bookedCount: number;
|
|
233
|
+
bookedLeadCount: number;
|
|
234
|
+
bookedFollowCount: number;
|
|
235
|
+
waitlistCount: number;
|
|
236
|
+
class: PublicClassSummary;
|
|
237
|
+
/** The session's own room, with no fallback to the class default. */
|
|
238
|
+
room: PublicRoomSummary | null;
|
|
239
|
+
instructor: PublicStaffSummary | null;
|
|
240
|
+
secondaryInstructor: PublicStaffSummary | null;
|
|
241
|
+
}
|
|
199
242
|
/** Row shape for `public.class_enrollments`. */
|
|
200
243
|
export interface ClassEnrollment {
|
|
201
244
|
id: string;
|
package/package.json
CHANGED