hububb-saas-shared 1.2.4 → 1.2.6
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/schemas/ai-agent/index.d.ts +1 -0
- package/dist/schemas/ai-agent/index.js +1 -0
- package/dist/schemas/ai-agent/property-ai-agent-subscription.d.ts +3 -0
- package/dist/schemas/ai-agent/property-ai-agent-subscription.js +1 -0
- package/dist/schemas/ai-agent/revenue-manager-config.d.ts +97 -0
- package/dist/schemas/ai-agent/revenue-manager-config.js +46 -0
- package/dist/types/ai-agent/index.d.ts +1 -0
- package/dist/types/ai-agent/index.js +1 -0
- package/dist/types/ai-agent/property-ai-agent-subscription.d.ts +4 -0
- package/dist/types/ai-agent/revenue-manager-config.d.ts +6 -0
- package/dist/types/ai-agent/revenue-manager-config.js +2 -0
- package/dist/types/enums/index.d.ts +2 -1
- package/dist/types/enums/index.js +1 -0
- package/package.json +1 -1
|
@@ -22,3 +22,4 @@ __exportStar(require("./agent-action-log"), exports);
|
|
|
22
22
|
__exportStar(require("./human-review-task"), exports);
|
|
23
23
|
__exportStar(require("./user-ai-agent-subscription"), exports);
|
|
24
24
|
__exportStar(require("./host-coordinator-config"), exports);
|
|
25
|
+
__exportStar(require("./revenue-manager-config"), exports);
|
|
@@ -2,6 +2,7 @@ export declare const propertyAiAgentSubscriptionSchema: import("zod").ZodObject<
|
|
|
2
2
|
id: import("zod").ZodNumber;
|
|
3
3
|
propertyId: import("zod").ZodNumber;
|
|
4
4
|
agentId: import("zod").ZodNumber;
|
|
5
|
+
hostCoordinatorConfigId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
5
6
|
enabled: import("zod").ZodBoolean;
|
|
6
7
|
enabledAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
7
8
|
enabledByUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -18,6 +19,7 @@ export declare const propertyAiAgentSubscriptionSchema: import("zod").ZodObject<
|
|
|
18
19
|
propertyId: number;
|
|
19
20
|
agentId: number;
|
|
20
21
|
enabled: boolean;
|
|
22
|
+
hostCoordinatorConfigId?: number | undefined;
|
|
21
23
|
enabledAt?: Date | undefined;
|
|
22
24
|
enabledByUserId?: string | undefined;
|
|
23
25
|
enabledByRole?: string | undefined;
|
|
@@ -31,6 +33,7 @@ export declare const propertyAiAgentSubscriptionSchema: import("zod").ZodObject<
|
|
|
31
33
|
propertyId: number;
|
|
32
34
|
agentId: number;
|
|
33
35
|
enabled: boolean;
|
|
36
|
+
hostCoordinatorConfigId?: number | undefined;
|
|
34
37
|
enabledAt?: Date | undefined;
|
|
35
38
|
enabledByUserId?: string | undefined;
|
|
36
39
|
enabledByRole?: string | undefined;
|
|
@@ -6,6 +6,7 @@ exports.propertyAiAgentSubscriptionSchema = (0, zod_1.object)({
|
|
|
6
6
|
id: (0, zod_1.number)().int(),
|
|
7
7
|
propertyId: (0, zod_1.number)().int(),
|
|
8
8
|
agentId: (0, zod_1.number)().int(),
|
|
9
|
+
hostCoordinatorConfigId: (0, zod_1.number)().int().optional(),
|
|
9
10
|
enabled: (0, zod_1.boolean)(),
|
|
10
11
|
enabledAt: (0, zod_1.date)().optional(),
|
|
11
12
|
enabledByUserId: (0, zod_1.string)().optional(),
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export declare const revenueManagerConfigSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
subscriptionId: import("zod").ZodNumber;
|
|
4
|
+
basePrice: import("zod").ZodNumber;
|
|
5
|
+
minPrice: import("zod").ZodNumber;
|
|
6
|
+
maxPrice: import("zod").ZodNumber;
|
|
7
|
+
currency: import("zod").ZodString;
|
|
8
|
+
strategy: import("zod").ZodString;
|
|
9
|
+
aggressiveness: import("zod").ZodNumber;
|
|
10
|
+
allowOccupancyAdjustments: import("zod").ZodBoolean;
|
|
11
|
+
highOccupancyThreshold: import("zod").ZodNumber;
|
|
12
|
+
highOccupancyBoostPct: import("zod").ZodNumber;
|
|
13
|
+
lowOccupancyThreshold: import("zod").ZodNumber;
|
|
14
|
+
lowOccupancyDiscountPct: import("zod").ZodNumber;
|
|
15
|
+
allowLastMinuteDiscounts: import("zod").ZodBoolean;
|
|
16
|
+
lastMinuteThresholdDays: import("zod").ZodNumber;
|
|
17
|
+
lastMinuteDiscountPct: import("zod").ZodNumber;
|
|
18
|
+
allowWeekendPremiums: import("zod").ZodBoolean;
|
|
19
|
+
weekendPremiumPct: import("zod").ZodNumber;
|
|
20
|
+
allowAdvanceBookingBoost: import("zod").ZodBoolean;
|
|
21
|
+
advanceBookingThresholdDays: import("zod").ZodNumber;
|
|
22
|
+
advanceBookingBoostPct: import("zod").ZodNumber;
|
|
23
|
+
allowMinStayAdjustments: import("zod").ZodBoolean;
|
|
24
|
+
baseMinStay: import("zod").ZodNumber;
|
|
25
|
+
weekendMinStay: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
26
|
+
highOccupancyMinStay: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
27
|
+
autoRecalculate: import("zod").ZodBoolean;
|
|
28
|
+
recalculateDaysAhead: import("zod").ZodNumber;
|
|
29
|
+
lastRecalculatedAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
30
|
+
lastRecalculationNote: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
|
+
createdAt: import("zod").ZodDate;
|
|
32
|
+
updatedAt: import("zod").ZodDate;
|
|
33
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
34
|
+
currency: string;
|
|
35
|
+
id: number;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
basePrice: number;
|
|
39
|
+
minPrice: number;
|
|
40
|
+
maxPrice: number;
|
|
41
|
+
subscriptionId: number;
|
|
42
|
+
strategy: string;
|
|
43
|
+
aggressiveness: number;
|
|
44
|
+
allowOccupancyAdjustments: boolean;
|
|
45
|
+
highOccupancyThreshold: number;
|
|
46
|
+
highOccupancyBoostPct: number;
|
|
47
|
+
lowOccupancyThreshold: number;
|
|
48
|
+
lowOccupancyDiscountPct: number;
|
|
49
|
+
allowLastMinuteDiscounts: boolean;
|
|
50
|
+
lastMinuteThresholdDays: number;
|
|
51
|
+
lastMinuteDiscountPct: number;
|
|
52
|
+
allowWeekendPremiums: boolean;
|
|
53
|
+
weekendPremiumPct: number;
|
|
54
|
+
allowAdvanceBookingBoost: boolean;
|
|
55
|
+
advanceBookingThresholdDays: number;
|
|
56
|
+
advanceBookingBoostPct: number;
|
|
57
|
+
allowMinStayAdjustments: boolean;
|
|
58
|
+
baseMinStay: number;
|
|
59
|
+
autoRecalculate: boolean;
|
|
60
|
+
recalculateDaysAhead: number;
|
|
61
|
+
weekendMinStay?: number | undefined;
|
|
62
|
+
highOccupancyMinStay?: number | undefined;
|
|
63
|
+
lastRecalculatedAt?: Date | undefined;
|
|
64
|
+
lastRecalculationNote?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
currency: string;
|
|
67
|
+
id: number;
|
|
68
|
+
createdAt: Date;
|
|
69
|
+
updatedAt: Date;
|
|
70
|
+
basePrice: number;
|
|
71
|
+
minPrice: number;
|
|
72
|
+
maxPrice: number;
|
|
73
|
+
subscriptionId: number;
|
|
74
|
+
strategy: string;
|
|
75
|
+
aggressiveness: number;
|
|
76
|
+
allowOccupancyAdjustments: boolean;
|
|
77
|
+
highOccupancyThreshold: number;
|
|
78
|
+
highOccupancyBoostPct: number;
|
|
79
|
+
lowOccupancyThreshold: number;
|
|
80
|
+
lowOccupancyDiscountPct: number;
|
|
81
|
+
allowLastMinuteDiscounts: boolean;
|
|
82
|
+
lastMinuteThresholdDays: number;
|
|
83
|
+
lastMinuteDiscountPct: number;
|
|
84
|
+
allowWeekendPremiums: boolean;
|
|
85
|
+
weekendPremiumPct: number;
|
|
86
|
+
allowAdvanceBookingBoost: boolean;
|
|
87
|
+
advanceBookingThresholdDays: number;
|
|
88
|
+
advanceBookingBoostPct: number;
|
|
89
|
+
allowMinStayAdjustments: boolean;
|
|
90
|
+
baseMinStay: number;
|
|
91
|
+
autoRecalculate: boolean;
|
|
92
|
+
recalculateDaysAhead: number;
|
|
93
|
+
weekendMinStay?: number | undefined;
|
|
94
|
+
highOccupancyMinStay?: number | undefined;
|
|
95
|
+
lastRecalculatedAt?: Date | undefined;
|
|
96
|
+
lastRecalculationNote?: string | undefined;
|
|
97
|
+
}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.revenueManagerConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.revenueManagerConfigSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)().int(),
|
|
7
|
+
subscriptionId: (0, zod_1.number)().int(),
|
|
8
|
+
// Pricing anchors
|
|
9
|
+
basePrice: (0, zod_1.number)(),
|
|
10
|
+
minPrice: (0, zod_1.number)(),
|
|
11
|
+
maxPrice: (0, zod_1.number)(),
|
|
12
|
+
currency: (0, zod_1.string)(),
|
|
13
|
+
// Strategy
|
|
14
|
+
strategy: (0, zod_1.string)(),
|
|
15
|
+
aggressiveness: (0, zod_1.number)().int(),
|
|
16
|
+
// Occupancy-based adjustments
|
|
17
|
+
allowOccupancyAdjustments: (0, zod_1.boolean)(),
|
|
18
|
+
highOccupancyThreshold: (0, zod_1.number)().int(),
|
|
19
|
+
highOccupancyBoostPct: (0, zod_1.number)().int(),
|
|
20
|
+
lowOccupancyThreshold: (0, zod_1.number)().int(),
|
|
21
|
+
lowOccupancyDiscountPct: (0, zod_1.number)().int(),
|
|
22
|
+
// Last-minute discounts
|
|
23
|
+
allowLastMinuteDiscounts: (0, zod_1.boolean)(),
|
|
24
|
+
lastMinuteThresholdDays: (0, zod_1.number)().int(),
|
|
25
|
+
lastMinuteDiscountPct: (0, zod_1.number)().int(),
|
|
26
|
+
// Weekend premium
|
|
27
|
+
allowWeekendPremiums: (0, zod_1.boolean)(),
|
|
28
|
+
weekendPremiumPct: (0, zod_1.number)().int(),
|
|
29
|
+
// Advance booking boost
|
|
30
|
+
allowAdvanceBookingBoost: (0, zod_1.boolean)(),
|
|
31
|
+
advanceBookingThresholdDays: (0, zod_1.number)().int(),
|
|
32
|
+
advanceBookingBoostPct: (0, zod_1.number)().int(),
|
|
33
|
+
// Minimum stay
|
|
34
|
+
allowMinStayAdjustments: (0, zod_1.boolean)(),
|
|
35
|
+
baseMinStay: (0, zod_1.number)().int(),
|
|
36
|
+
weekendMinStay: (0, zod_1.number)().int().optional(),
|
|
37
|
+
highOccupancyMinStay: (0, zod_1.number)().int().optional(),
|
|
38
|
+
// Automation
|
|
39
|
+
autoRecalculate: (0, zod_1.boolean)(),
|
|
40
|
+
recalculateDaysAhead: (0, zod_1.number)().int(),
|
|
41
|
+
// Last run metadata
|
|
42
|
+
lastRecalculatedAt: (0, zod_1.date)().optional(),
|
|
43
|
+
lastRecalculationNote: (0, zod_1.string)().optional(),
|
|
44
|
+
createdAt: (0, zod_1.date)(),
|
|
45
|
+
updatedAt: (0, zod_1.date)(),
|
|
46
|
+
});
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./agent-action-log"), exports);
|
|
|
22
22
|
__exportStar(require("./human-review-task"), exports);
|
|
23
23
|
__exportStar(require("./user-ai-agent-subscription"), exports);
|
|
24
24
|
__exportStar(require("./host-coordinator-config"), exports);
|
|
25
|
+
__exportStar(require("./revenue-manager-config"), exports);
|
|
@@ -3,6 +3,8 @@ import { propertyAiAgentSubscriptionSchema } from "../../schemas/ai-agent";
|
|
|
3
3
|
import { Property } from "../property";
|
|
4
4
|
import { AiAgent } from "./ai-agent";
|
|
5
5
|
import { GuestCoordinatorConfig } from "./guest-coordinator-config";
|
|
6
|
+
import { RevenueManagerConfig } from "./revenue-manager-config";
|
|
7
|
+
import { HostCoordinatorConfig } from "./host-coordinator-config";
|
|
6
8
|
import { AgentThreadSession } from "./agent-thread-session";
|
|
7
9
|
import { AgentActionLog } from "./agent-action-log";
|
|
8
10
|
import { HumanReviewTask } from "./human-review-task";
|
|
@@ -10,6 +12,8 @@ export interface PropertyAiAgentSubscription extends infer<typeof propertyAiAgen
|
|
|
10
12
|
property?: Property;
|
|
11
13
|
agent?: AiAgent;
|
|
12
14
|
guestCoordinatorConfig?: GuestCoordinatorConfig;
|
|
15
|
+
revenueManagerConfig?: RevenueManagerConfig;
|
|
16
|
+
hostCoordinatorConfig?: HostCoordinatorConfig;
|
|
13
17
|
threadSessions?: AgentThreadSession[];
|
|
14
18
|
actionLogs?: AgentActionLog[];
|
|
15
19
|
humanReviewTasks?: HumanReviewTask[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { revenueManagerConfigSchema } from "../../schemas/ai-agent";
|
|
3
|
+
import { PropertyAiAgentSubscription } from "./property-ai-agent-subscription";
|
|
4
|
+
export interface RevenueManagerConfig extends infer<typeof revenueManagerConfigSchema> {
|
|
5
|
+
subscription?: PropertyAiAgentSubscription;
|
|
6
|
+
}
|
|
@@ -91,7 +91,8 @@ export declare enum AgentActionType {
|
|
|
91
91
|
ESCALATED = "ESCALATED",
|
|
92
92
|
NOTE_SAVED = "NOTE_SAVED",
|
|
93
93
|
HOST_NOTIFIED = "HOST_NOTIFIED",
|
|
94
|
-
SKIPPED = "SKIPPED"
|
|
94
|
+
SKIPPED = "SKIPPED",
|
|
95
|
+
PRICING_UPDATED = "PRICING_UPDATED"
|
|
95
96
|
}
|
|
96
97
|
export declare enum HumanReviewPriority {
|
|
97
98
|
LOW = "LOW",
|
|
@@ -114,6 +114,7 @@ var AgentActionType;
|
|
|
114
114
|
AgentActionType["NOTE_SAVED"] = "NOTE_SAVED";
|
|
115
115
|
AgentActionType["HOST_NOTIFIED"] = "HOST_NOTIFIED";
|
|
116
116
|
AgentActionType["SKIPPED"] = "SKIPPED";
|
|
117
|
+
AgentActionType["PRICING_UPDATED"] = "PRICING_UPDATED";
|
|
117
118
|
})(AgentActionType || (exports.AgentActionType = AgentActionType = {}));
|
|
118
119
|
var HumanReviewPriority;
|
|
119
120
|
(function (HumanReviewPriority) {
|