wedance-shared 1.0.252 → 1.0.254

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.
@@ -12,9 +12,15 @@ export type Links = {
12
12
  website?: string;
13
13
  other?: string;
14
14
  };
15
+ export type Coordinates = {
16
+ latitude: number;
17
+ longitude: number;
18
+ };
15
19
  export type Location = {
16
20
  name: string;
17
21
  address?: string;
22
+ /** Venue position, set when the address was picked from Google. Null for older events. */
23
+ coordinates?: Coordinates | null;
18
24
  };
19
25
  export type EventStatus = "published" | "cancelled" | "unpublished" | "draft";
20
26
  export type ImageData = {
@@ -104,9 +104,56 @@ export interface SchoolRoom {
104
104
  color: string | null;
105
105
  position: number;
106
106
  status: SchoolRoomStatus;
107
+ rentalEnabled: boolean;
108
+ /** MINOR units per hour. */
109
+ rentalHourlyRate: number | null;
107
110
  createdAt: string;
108
111
  updatedAt: string;
109
112
  }
113
+ export type RoomRentalStatus = "confirmed" | "cancelled";
114
+ export type RoomRentalPaymentStatus = "unpaid" | "paid";
115
+ /** `external`: paid outside WeDance. `wedance`: paid through WeDance. */
116
+ export type RoomRentalPaymentSource = "external" | "wedance";
117
+ /** Row shape for `public.school_room_rentals`, with the room name joined in. */
118
+ export interface SchoolRoomRental {
119
+ id: string;
120
+ organizerId: string;
121
+ roomId: string;
122
+ roomName: string;
123
+ startsAt: string;
124
+ endsAt: string;
125
+ renterName: string;
126
+ renterEmail: string | null;
127
+ notes: string | null;
128
+ /** MINOR units. */
129
+ totalAmount: number;
130
+ currency: string;
131
+ status: RoomRentalStatus;
132
+ paymentStatus: RoomRentalPaymentStatus;
133
+ paymentSource: RoomRentalPaymentSource | null;
134
+ paymentMethod: string | null;
135
+ paymentIntentId: string | null;
136
+ paidAt: string | null;
137
+ createdAt: string;
138
+ updatedAt: string;
139
+ }
140
+ export interface RoomAvailabilityBusySlot {
141
+ startsAt: string;
142
+ endsAt: string;
143
+ kind: "session" | "rental";
144
+ id: string;
145
+ label: string;
146
+ }
147
+ export interface RoomAvailability {
148
+ roomId: string;
149
+ from: string;
150
+ to: string;
151
+ busy: RoomAvailabilityBusySlot[];
152
+ free: {
153
+ startsAt: string;
154
+ endsAt: string;
155
+ }[];
156
+ }
110
157
  /**
111
158
  * Lightweight room projection for schedule and session display.
112
159
  * Populated server-side via a join.
@@ -385,8 +432,8 @@ export type ClassSessionRegistrationRosterItem = ClassSessionRegistration & {
385
432
  export type ClassSessionRegistrationListItem = ClassSessionRegistration & {
386
433
  session: ClassSessionSummary;
387
434
  };
388
- export type SchoolActivityAction = "class_created" | "class_updated" | "class_cancelled" | "class_rescheduled" | "instructor_changed" | "student_created" | "student_enrolled" | "student_removed" | "student_waitlisted" | "student_removed_from_waitlist" | "attendance_marked" | "attendance_changed" | "pass_granted" | "pass_adjusted" | "pass_revoked" | "staff_created" | "staff_access_changed" | "staff_removed";
389
- export type SchoolActivityEntityType = "class" | "class_session" | "student" | "enrollment" | "attendance" | "student_pass" | "staff";
435
+ export type SchoolActivityAction = "class_created" | "class_updated" | "class_cancelled" | "class_rescheduled" | "instructor_changed" | "student_created" | "student_enrolled" | "student_removed" | "student_waitlisted" | "student_removed_from_waitlist" | "attendance_marked" | "attendance_changed" | "pass_granted" | "pass_adjusted" | "pass_revoked" | "staff_created" | "staff_access_changed" | "staff_removed" | "rental_created" | "rental_updated" | "rental_cancelled" | "rental_payment_recorded";
436
+ export type SchoolActivityEntityType = "class" | "class_session" | "student" | "enrollment" | "attendance" | "student_pass" | "staff" | "room_rental";
390
437
  export type SchoolActivityMetadata = Record<string, unknown>;
391
438
  export type SchoolActivityValues = Record<string, unknown>;
392
439
  export interface SchoolActivity {
@@ -22,6 +22,7 @@ export interface Transaction {
22
22
  userId: string | null;
23
23
  studentId: string | null;
24
24
  passId: string | null;
25
+ roomRentalId: string | null;
25
26
  /**
26
27
  * The payment a refund reverses. Always set on a refund, always null on a
27
28
  * payment.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.252",
3
+ "version": "1.0.254",
4
4
  "description": "This repository contains shared TypeScript types and interfaces used across multiple WeDance applications:",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",