wedance-shared 1.0.247 → 1.0.249

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.
@@ -128,6 +128,26 @@ export type TicketTypeBase = {
128
128
  */
129
129
  classId?: string | null;
130
130
  accessScope: PassAccessScope;
131
+ /**
132
+ * Group the ticket type is displayed under, see {@link TicketTypeGroup}
133
+ */
134
+ groupId: string | null;
135
+ /**
136
+ * Display order, ascending. Within a group when groupId is set.
137
+ */
138
+ sortOrder: number;
139
+ };
140
+ /**
141
+ * A named section grouping an event's ticket types (e.g. "Full passes").
142
+ */
143
+ export type TicketTypeGroup = {
144
+ id: string;
145
+ eventId: string;
146
+ name: string;
147
+ description: string | null;
148
+ sortOrder: number;
149
+ createdAt: string;
150
+ updatedAt: string;
131
151
  };
132
152
  /**
133
153
  * A ticket sold for one specific event. The only variant currently written in
@@ -211,6 +231,19 @@ export type CourseTicketType = TicketTypeBase & {
211
231
  * `is*TicketType` guards before reading variant-specific fields.
212
232
  */
213
233
  export type TicketType = EventTicketType | DropInTicketType | PassTicketType | MembershipTicketType | CourseTicketType;
234
+ /**
235
+ * A ticket type group with its ticket types, already sorted by sortOrder.
236
+ */
237
+ export type TicketTypeGroupWithTickets = TicketTypeGroup & {
238
+ ticketTypes: TicketType[];
239
+ };
240
+ /**
241
+ * An event's ticket types split into their groups, ready to render as-is.
242
+ */
243
+ export type GroupedTicketTypes = {
244
+ groups: TicketTypeGroupWithTickets[];
245
+ ungrouped: TicketType[];
246
+ };
214
247
  /**
215
248
  * @deprecated Prefer the explicit {@link EventTicketType}, or {@link TicketType}
216
249
  * when the product may not be an event. Retained for backward compatibility.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wedance-shared",
3
- "version": "1.0.247",
3
+ "version": "1.0.249",
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",