@epztickets/common 1.84.0 → 1.86.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.
@@ -0,0 +1,53 @@
1
+ import { Subjects } from "./subjects";
2
+ export type OrientationStatus = "scheduled" | "approved" | "no_show" | "declined" | "cancelled";
3
+ export declare const CLASS_CATEGORIES: readonly [{
4
+ readonly value: "singing";
5
+ readonly label: "Singing / vocal";
6
+ }, {
7
+ readonly value: "instrumental";
8
+ readonly label: "Instrumental";
9
+ }, {
10
+ readonly value: "dance";
11
+ readonly label: "Dance";
12
+ }, {
13
+ readonly value: "fitness";
14
+ readonly label: "Fitness";
15
+ }, {
16
+ readonly value: "theater";
17
+ readonly label: "Theater / acting";
18
+ }, {
19
+ readonly value: "yoga";
20
+ readonly label: "Yoga / Pilates / wellness";
21
+ }, {
22
+ readonly value: "martial_arts";
23
+ readonly label: "Martial arts";
24
+ }, {
25
+ readonly value: "workshop";
26
+ readonly label: "Workshop / lecture";
27
+ }, {
28
+ readonly value: "other";
29
+ readonly label: "Other";
30
+ }];
31
+ export declare const classCategoryLabel: (v?: string) => string | undefined;
32
+ export interface OrientationSnapshot {
33
+ id: string;
34
+ ownerUserId: string;
35
+ renterUserId: string;
36
+ renterEmail: string;
37
+ renterName: string;
38
+ renterPhone?: string;
39
+ roomId: string;
40
+ roomTitle: string;
41
+ startTime: string;
42
+ endTime: string;
43
+ timezone?: string;
44
+ status: OrientationStatus;
45
+ sequence: number;
46
+ intendedUse?: string;
47
+ classCategory?: string;
48
+ notes?: string;
49
+ }
50
+ export interface OrientationScheduledEvent {
51
+ subject: Subjects.OrientationScheduled;
52
+ data: OrientationSnapshot;
53
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.classCategoryLabel = exports.CLASS_CATEGORIES = void 0;
4
+ // "Category of class" the renter picks on the orientation form.
5
+ // Shared by rooms (validation), notifications (email labels); the
6
+ // frontend keeps a matching copy in lib/orientations.ts.
7
+ exports.CLASS_CATEGORIES = [
8
+ { value: "singing", label: "Singing / vocal" },
9
+ { value: "instrumental", label: "Instrumental" },
10
+ { value: "dance", label: "Dance" },
11
+ { value: "fitness", label: "Fitness" },
12
+ { value: "theater", label: "Theater / acting" },
13
+ { value: "yoga", label: "Yoga / Pilates / wellness" },
14
+ { value: "martial_arts", label: "Martial arts" },
15
+ { value: "workshop", label: "Workshop / lecture" },
16
+ { value: "other", label: "Other" },
17
+ ];
18
+ const classCategoryLabel = (v) => { var _a, _b; return (_b = (_a = exports.CLASS_CATEGORIES.find((c) => c.value === v)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : v; };
19
+ exports.classCategoryLabel = classCategoryLabel;
@@ -0,0 +1,10 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface OrientationSettingsUpdatedEvent {
3
+ subject: Subjects.OrientationSettingsUpdated;
4
+ data: {
5
+ ownerUserId: string;
6
+ requireOrientation: boolean;
7
+ durationMinutes: number;
8
+ updatedAt: string;
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { Subjects } from "./subjects";
2
+ import { OrientationSnapshot } from "./orientation-scheduled-event";
3
+ export interface OrientationUpdatedEvent {
4
+ subject: Subjects.OrientationUpdated;
5
+ data: {
6
+ orientation: OrientationSnapshot;
7
+ change: "rescheduled" | "cancelled" | "approved" | "no_show" | "declined";
8
+ changedBy: "renter" | "owner" | "admin";
9
+ previousStartTime?: string;
10
+ previousEndTime?: string;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface RenterApprovalChangedEvent {
3
+ subject: Subjects.RenterApprovalChanged;
4
+ data: {
5
+ ownerUserId: string;
6
+ renterUserId: string;
7
+ approved: boolean;
8
+ source: "orientation" | "manual";
9
+ orientationId?: string;
10
+ roomId?: string;
11
+ roomTitle?: string;
12
+ changedAt: string;
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -46,7 +46,11 @@ export declare enum Subjects {
46
46
  ApprovedLocationRemoved = "events.approved-location.removed",
47
47
  SupportTicketCreated = "events.support-ticket.created",
48
48
  SupportTicketUpdated = "events.support-ticket.updated",
49
- SupportTicketUserReplied = "events.support-ticket.user-replied"
49
+ SupportTicketUserReplied = "events.support-ticket.user-replied",
50
+ OrientationSettingsUpdated = "events.orientation.settings-updated",
51
+ RenterApprovalChanged = "events.orientation.renter-approval-changed",
52
+ OrientationScheduled = "events.orientation.scheduled",
53
+ OrientationUpdated = "events.orientation.updated"
50
54
  }
51
55
  export declare enum Streams {
52
56
  Events = "events",
@@ -145,6 +145,21 @@ var Subjects;
145
145
  // Published by auth when the ticket's SUBMITTER replies in the
146
146
  // conversation thread. notifications-srv emails the admin inbox.
147
147
  Subjects["SupportTicketUserReplied"] = "events.support-ticket.user-replied";
148
+ // Renter orientation lifecycle (rooms service owns it). Owners can
149
+ // require a first-time renter to attend an orientation and be
150
+ // approved before booking any of their rooms.
151
+ // SettingsUpdated — owner turned the requirement on/off. orders
152
+ // mirrors it to gate POST /api/orders.
153
+ // RenterApprovalChanged — owner approved (after orientation, or
154
+ // manually) or revoked a renter. orders mirrors
155
+ // it; notifications emails the renter.
156
+ // Scheduled / Updated — orientation booked, then rescheduled /
157
+ // cancelled / decided. notifications sends the
158
+ // emails + calendar invites.
159
+ Subjects["OrientationSettingsUpdated"] = "events.orientation.settings-updated";
160
+ Subjects["RenterApprovalChanged"] = "events.orientation.renter-approval-changed";
161
+ Subjects["OrientationScheduled"] = "events.orientation.scheduled";
162
+ Subjects["OrientationUpdated"] = "events.orientation.updated";
148
163
  })(Subjects || (exports.Subjects = Subjects = {}));
149
164
  var Streams;
150
165
  (function (Streams) {
package/build/index.d.ts CHANGED
@@ -33,6 +33,10 @@ export * from "./events/approved-location-removed-event";
33
33
  export * from "./events/support-ticket-created-event";
34
34
  export * from "./events/support-ticket-updated-event";
35
35
  export * from "./events/support-ticket-user-replied-event";
36
+ export * from "./events/orientation-settings-updated-event";
37
+ export * from "./events/renter-approval-changed-event";
38
+ export * from "./events/orientation-scheduled-event";
39
+ export * from "./events/orientation-updated-event";
36
40
  export * from "./events/order-cancelled-event";
37
41
  export * from "./events/order-completed-event";
38
42
  export * from "./events/order-created-event";
package/build/index.js CHANGED
@@ -53,6 +53,10 @@ __exportStar(require("./events/approved-location-removed-event"), exports);
53
53
  __exportStar(require("./events/support-ticket-created-event"), exports);
54
54
  __exportStar(require("./events/support-ticket-updated-event"), exports);
55
55
  __exportStar(require("./events/support-ticket-user-replied-event"), exports);
56
+ __exportStar(require("./events/orientation-settings-updated-event"), exports);
57
+ __exportStar(require("./events/renter-approval-changed-event"), exports);
58
+ __exportStar(require("./events/orientation-scheduled-event"), exports);
59
+ __exportStar(require("./events/orientation-updated-event"), exports);
56
60
  __exportStar(require("./events/order-cancelled-event"), exports);
57
61
  __exportStar(require("./events/order-completed-event"), exports);
58
62
  __exportStar(require("./events/order-created-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epztickets/common",
3
- "version": "1.84.0",
3
+ "version": "1.86.0",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [