hububb-saas-shared 1.2.30 → 1.2.32

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.
@@ -95,3 +95,4 @@ export * from "./task-reporting-photo";
95
95
  export * from "./task-pricing";
96
96
  export * from "./task-estimate";
97
97
  export * from "./task-provider-pricing";
98
+ export * from "./reservation-night-fact";
@@ -111,3 +111,4 @@ __exportStar(require("./task-reporting-photo"), exports);
111
111
  __exportStar(require("./task-pricing"), exports);
112
112
  __exportStar(require("./task-estimate"), exports);
113
113
  __exportStar(require("./task-provider-pricing"), exports);
114
+ __exportStar(require("./reservation-night-fact"), exports);
@@ -83,6 +83,8 @@ export declare const ReservationFinanceSchema: z.ZodObject<{
83
83
  hububbFeeValue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
84
84
  hububbPayout: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
85
85
  otaCommissionVat: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
86
+ cleaningFee: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
87
+ servicesTotal: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>;
86
88
  }, "strip", z.ZodTypeAny, {
87
89
  id: number;
88
90
  createdAt: Date;
@@ -99,6 +101,8 @@ export declare const ReservationFinanceSchema: z.ZodObject<{
99
101
  hububbFeeValue: number;
100
102
  hububbPayout: number;
101
103
  otaCommissionVat: number;
104
+ cleaningFee?: number | undefined;
105
+ servicesTotal?: number | undefined;
102
106
  }, {
103
107
  id: number;
104
108
  createdAt: Date;
@@ -115,6 +119,8 @@ export declare const ReservationFinanceSchema: z.ZodObject<{
115
119
  hububbFeeValue: string | number;
116
120
  hububbPayout: string | number;
117
121
  otaCommissionVat: string | number;
122
+ cleaningFee?: string | number | undefined;
123
+ servicesTotal?: string | number | undefined;
118
124
  }>;
119
125
  export declare const ReservationSchema: z.ZodObject<{
120
126
  id: z.ZodNumber;
@@ -54,6 +54,8 @@ exports.ReservationFinanceSchema = zod_1.z.object({
54
54
  hububbFeeValue: prisma_decimal_1.zDecimal,
55
55
  hububbPayout: prisma_decimal_1.zDecimal,
56
56
  otaCommissionVat: prisma_decimal_1.zDecimal,
57
+ cleaningFee: prisma_decimal_1.zDecimal.optional(),
58
+ servicesTotal: prisma_decimal_1.zDecimal.optional(),
57
59
  });
58
60
  exports.ReservationSchema = zod_1.z.object({
59
61
  id: zod_1.z.number(),
@@ -0,0 +1,77 @@
1
+ import { z } from "zod";
2
+ export declare const ReservationNightFactSchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ reservationId: z.ZodNumber;
5
+ propertyId: z.ZodNumber;
6
+ roomId: z.ZodNumber;
7
+ date: z.ZodDate;
8
+ dateString: z.ZodString;
9
+ channelId: z.ZodOptional<z.ZodString>;
10
+ otaName: z.ZodString;
11
+ currency: z.ZodString;
12
+ status: z.ZodEnum<["CONFIRMED", "CANCELLED", "PENDING"]>;
13
+ grossRevenue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
14
+ netRevenue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
15
+ roomRevenue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
16
+ adrRevenue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
17
+ cleaningFee: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
18
+ servicesTotal: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
19
+ otaCommissionValue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
20
+ paymentFeeValue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
21
+ hububbFeeValue: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
22
+ hububbPayout: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>;
23
+ isOccupied: z.ZodBoolean;
24
+ isCancelled: z.ZodBoolean;
25
+ createdAt: z.ZodDate;
26
+ updatedAt: z.ZodDate;
27
+ }, "strip", z.ZodTypeAny, {
28
+ currency: string;
29
+ id: number;
30
+ status: "PENDING" | "CONFIRMED" | "CANCELLED";
31
+ date: Date;
32
+ createdAt: Date;
33
+ updatedAt: Date;
34
+ cleaningFee: number;
35
+ propertyId: number;
36
+ roomId: number;
37
+ reservationId: number;
38
+ otaCommissionValue: number;
39
+ paymentFeeValue: number;
40
+ hububbFeeValue: number;
41
+ hububbPayout: number;
42
+ servicesTotal: number;
43
+ otaName: string;
44
+ dateString: string;
45
+ grossRevenue: number;
46
+ netRevenue: number;
47
+ roomRevenue: number;
48
+ adrRevenue: number;
49
+ isOccupied: boolean;
50
+ isCancelled: boolean;
51
+ channelId?: string | undefined;
52
+ }, {
53
+ currency: string;
54
+ id: number;
55
+ status: "PENDING" | "CONFIRMED" | "CANCELLED";
56
+ date: Date;
57
+ createdAt: Date;
58
+ updatedAt: Date;
59
+ cleaningFee: string | number;
60
+ propertyId: number;
61
+ roomId: number;
62
+ reservationId: number;
63
+ otaCommissionValue: string | number;
64
+ paymentFeeValue: string | number;
65
+ hububbFeeValue: string | number;
66
+ hububbPayout: string | number;
67
+ servicesTotal: string | number;
68
+ otaName: string;
69
+ dateString: string;
70
+ grossRevenue: string | number;
71
+ netRevenue: string | number;
72
+ roomRevenue: string | number;
73
+ adrRevenue: string | number;
74
+ isOccupied: boolean;
75
+ isCancelled: boolean;
76
+ channelId?: string | undefined;
77
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReservationNightFactSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const prisma_decimal_1 = require("../prisma-decimal");
6
+ const reservation_1 = require("../reservation");
7
+ exports.ReservationNightFactSchema = zod_1.z.object({
8
+ id: zod_1.z.number(),
9
+ reservationId: zod_1.z.number(),
10
+ propertyId: zod_1.z.number(),
11
+ roomId: zod_1.z.number(),
12
+ date: zod_1.z.date(),
13
+ dateString: zod_1.z.string(),
14
+ channelId: zod_1.z.string().optional(),
15
+ otaName: zod_1.z.string(),
16
+ currency: zod_1.z.string(),
17
+ status: reservation_1.ReservationStatusEnum,
18
+ grossRevenue: prisma_decimal_1.zDecimal,
19
+ netRevenue: prisma_decimal_1.zDecimal,
20
+ roomRevenue: prisma_decimal_1.zDecimal,
21
+ adrRevenue: prisma_decimal_1.zDecimal,
22
+ cleaningFee: prisma_decimal_1.zDecimal,
23
+ servicesTotal: prisma_decimal_1.zDecimal,
24
+ otaCommissionValue: prisma_decimal_1.zDecimal,
25
+ paymentFeeValue: prisma_decimal_1.zDecimal,
26
+ hububbFeeValue: prisma_decimal_1.zDecimal,
27
+ hububbPayout: prisma_decimal_1.zDecimal,
28
+ isOccupied: zod_1.z.boolean(),
29
+ isCancelled: zod_1.z.boolean(),
30
+ createdAt: zod_1.z.date(),
31
+ updatedAt: zod_1.z.date(),
32
+ });
@@ -5,16 +5,22 @@ export declare const ReservationRoomSchema: z.ZodObject<{
5
5
  reservationId: z.ZodNumber;
6
6
  createdAt: z.ZodDate;
7
7
  updatedAt: z.ZodDate;
8
+ isRoomChanged: z.ZodBoolean;
9
+ originalRoomId: z.ZodOptional<z.ZodNumber>;
8
10
  }, "strip", z.ZodTypeAny, {
9
11
  id: number;
10
12
  createdAt: Date;
11
13
  updatedAt: Date;
12
14
  roomId: number;
13
15
  reservationId: number;
16
+ isRoomChanged: boolean;
17
+ originalRoomId?: number | undefined;
14
18
  }, {
15
19
  id: number;
16
20
  createdAt: Date;
17
21
  updatedAt: Date;
18
22
  roomId: number;
19
23
  reservationId: number;
24
+ isRoomChanged: boolean;
25
+ originalRoomId?: number | undefined;
20
26
  }>;
@@ -8,4 +8,6 @@ exports.ReservationRoomSchema = zod_1.z.object({
8
8
  reservationId: zod_1.z.number(),
9
9
  createdAt: zod_1.z.date(),
10
10
  updatedAt: zod_1.z.date(),
11
+ isRoomChanged: zod_1.z.boolean(),
12
+ originalRoomId: zod_1.z.number().optional(),
11
13
  });
@@ -96,3 +96,4 @@ export * from "./task-reporting-photo";
96
96
  export * from "./task-pricing";
97
97
  export * from "./task-estimate";
98
98
  export * from "./task-provider-pricing";
99
+ export * from "./reservation-night-fact";
@@ -112,3 +112,4 @@ __exportStar(require("./task-reporting-photo"), exports);
112
112
  __exportStar(require("./task-pricing"), exports);
113
113
  __exportStar(require("./task-estimate"), exports);
114
114
  __exportStar(require("./task-provider-pricing"), exports);
115
+ __exportStar(require("./reservation-night-fact"), exports);
@@ -30,6 +30,7 @@ import { AgentActionLog } from "../ai-agent/agent-action-log";
30
30
  import { HumanReviewTask } from "../ai-agent/human-review-task";
31
31
  import { RevenueManagerRunLog } from "../ai-agent/revenue-manager-run-log";
32
32
  import { ReservationOriginalUnit } from "../reservation-original-unit";
33
+ import { ReservationNightFact } from "../reservation-night-fact";
33
34
  export interface Property extends infer<typeof propertySchema> {
34
35
  user?: User;
35
36
  rooms?: Room[];
@@ -66,6 +67,7 @@ export interface Property extends infer<typeof propertySchema> {
66
67
  humanReviewTasks?: HumanReviewTask[];
67
68
  revenueManagerRunLogs?: RevenueManagerRunLog[];
68
69
  reservationOriginalUnits?: ReservationOriginalUnit[];
70
+ reservationNightFacts?: ReservationNightFact[];
69
71
  }
70
72
  export interface UpdatePropertySchema extends infer<typeof updatePropertySchema> {
71
73
  }
@@ -16,6 +16,7 @@ export interface Reservation extends infer<typeof ReservationSchema> {
16
16
  payout?: Payout;
17
17
  finance?: ReservationFinance;
18
18
  originalUnit?: ReservationOriginalUnit;
19
+ reservationNightFacts?: import("../reservation-night-fact").ReservationNightFact[];
19
20
  }
20
21
  export interface ReservationFinance extends infer<typeof ReservationFinanceSchema> {
21
22
  reservation?: Reservation;
@@ -0,0 +1,10 @@
1
+ import { infer } from "zod";
2
+ import { ReservationNightFactSchema } from "../../schemas/reservation-night-fact";
3
+ import { Reservation } from "../reservation";
4
+ import { Property } from "../property";
5
+ import { Room } from "../room";
6
+ export interface ReservationNightFact extends infer<typeof ReservationNightFactSchema> {
7
+ reservation?: Reservation;
8
+ property?: Property;
9
+ room?: Room;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,10 +10,12 @@ import { CleaningChecklist } from "../cleaning-checklist";
10
10
  import { SuppliesAndNotesHandbook } from "../supplies-and-notes-handbook";
11
11
  import { Task } from "../task";
12
12
  import { ReservationOriginalUnit } from "../reservation-original-unit";
13
+ import { ReservationNightFact } from "../reservation-night-fact";
13
14
  export interface Room extends infer<typeof roomSchema> {
14
15
  ratePlans?: RatePlan[];
15
16
  property?: Property;
16
17
  reservationRooms?: ReservationRoom[];
18
+ originalReservationRooms?: ReservationRoom[];
17
19
  blockedDates?: BlockedDate[];
18
20
  originalRoom?: Room;
19
21
  derivedRooms?: Room[];
@@ -23,4 +25,5 @@ export interface Room extends infer<typeof roomSchema> {
23
25
  suppliesAndNotesHandbook?: SuppliesAndNotesHandbook;
24
26
  tasks?: Task[];
25
27
  reservationOriginalUnits?: ReservationOriginalUnit[];
28
+ reservationNightFacts?: ReservationNightFact[];
26
29
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.2.30",
4
+ "version": "1.2.32",
5
5
  "description": "This is a shared package for the hububb saas project",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",