hububb-saas-shared 1.2.4 → 1.2.5

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.
@@ -6,3 +6,4 @@ export * from "./agent-action-log";
6
6
  export * from "./human-review-task";
7
7
  export * from "./user-ai-agent-subscription";
8
8
  export * from "./host-coordinator-config";
9
+ export * from "./revenue-manager-config";
@@ -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,85 @@
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
+ autoRecalculate: import("zod").ZodBoolean;
24
+ recalculateDaysAhead: import("zod").ZodNumber;
25
+ lastRecalculatedAt: import("zod").ZodOptional<import("zod").ZodDate>;
26
+ lastRecalculationNote: import("zod").ZodOptional<import("zod").ZodString>;
27
+ createdAt: import("zod").ZodDate;
28
+ updatedAt: import("zod").ZodDate;
29
+ }, "strip", import("zod").ZodTypeAny, {
30
+ currency: string;
31
+ id: number;
32
+ createdAt: Date;
33
+ updatedAt: Date;
34
+ basePrice: number;
35
+ minPrice: number;
36
+ maxPrice: number;
37
+ subscriptionId: number;
38
+ strategy: string;
39
+ aggressiveness: number;
40
+ allowOccupancyAdjustments: boolean;
41
+ highOccupancyThreshold: number;
42
+ highOccupancyBoostPct: number;
43
+ lowOccupancyThreshold: number;
44
+ lowOccupancyDiscountPct: number;
45
+ allowLastMinuteDiscounts: boolean;
46
+ lastMinuteThresholdDays: number;
47
+ lastMinuteDiscountPct: number;
48
+ allowWeekendPremiums: boolean;
49
+ weekendPremiumPct: number;
50
+ allowAdvanceBookingBoost: boolean;
51
+ advanceBookingThresholdDays: number;
52
+ advanceBookingBoostPct: number;
53
+ autoRecalculate: boolean;
54
+ recalculateDaysAhead: number;
55
+ lastRecalculatedAt?: Date | undefined;
56
+ lastRecalculationNote?: string | undefined;
57
+ }, {
58
+ currency: string;
59
+ id: number;
60
+ createdAt: Date;
61
+ updatedAt: Date;
62
+ basePrice: number;
63
+ minPrice: number;
64
+ maxPrice: number;
65
+ subscriptionId: number;
66
+ strategy: string;
67
+ aggressiveness: number;
68
+ allowOccupancyAdjustments: boolean;
69
+ highOccupancyThreshold: number;
70
+ highOccupancyBoostPct: number;
71
+ lowOccupancyThreshold: number;
72
+ lowOccupancyDiscountPct: number;
73
+ allowLastMinuteDiscounts: boolean;
74
+ lastMinuteThresholdDays: number;
75
+ lastMinuteDiscountPct: number;
76
+ allowWeekendPremiums: boolean;
77
+ weekendPremiumPct: number;
78
+ allowAdvanceBookingBoost: boolean;
79
+ advanceBookingThresholdDays: number;
80
+ advanceBookingBoostPct: number;
81
+ autoRecalculate: boolean;
82
+ recalculateDaysAhead: number;
83
+ lastRecalculatedAt?: Date | undefined;
84
+ lastRecalculationNote?: string | undefined;
85
+ }>;
@@ -0,0 +1,41 @@
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
+ // Automation
34
+ autoRecalculate: (0, zod_1.boolean)(),
35
+ recalculateDaysAhead: (0, zod_1.number)().int(),
36
+ // Last run metadata
37
+ lastRecalculatedAt: (0, zod_1.date)().optional(),
38
+ lastRecalculationNote: (0, zod_1.string)().optional(),
39
+ createdAt: (0, zod_1.date)(),
40
+ updatedAt: (0, zod_1.date)(),
41
+ });
@@ -6,3 +6,4 @@ export * from "./agent-action-log";
6
6
  export * from "./human-review-task";
7
7
  export * from "./user-ai-agent-subscription";
8
8
  export * from "./host-coordinator-config";
9
+ export * from "./revenue-manager-config";
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.2.4",
4
+ "version": "1.2.5",
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",