hububb-saas-shared 1.2.3 → 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.
- package/dist/schemas/ai-agent/agent-action-log.d.ts +3 -0
- package/dist/schemas/ai-agent/agent-action-log.js +1 -0
- package/dist/schemas/ai-agent/agent-thread-session.d.ts +6 -3
- package/dist/schemas/ai-agent/agent-thread-session.js +2 -1
- package/dist/schemas/ai-agent/host-coordinator-config.d.ts +68 -0
- package/dist/schemas/ai-agent/host-coordinator-config.js +33 -0
- package/dist/schemas/ai-agent/human-review-task.d.ts +6 -3
- package/dist/schemas/ai-agent/human-review-task.js +2 -1
- package/dist/schemas/ai-agent/index.d.ts +3 -0
- package/dist/schemas/ai-agent/index.js +3 -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 +85 -0
- package/dist/schemas/ai-agent/revenue-manager-config.js +41 -0
- package/dist/schemas/ai-agent/user-ai-agent-subscription.d.ts +40 -0
- package/dist/schemas/ai-agent/user-ai-agent-subscription.js +18 -0
- package/dist/types/ai-agent/agent-action-log.d.ts +2 -0
- package/dist/types/ai-agent/agent-thread-session.d.ts +2 -0
- package/dist/types/ai-agent/ai-agent.d.ts +2 -0
- package/dist/types/ai-agent/host-coordinator-config.d.ts +6 -0
- package/dist/types/ai-agent/host-coordinator-config.js +2 -0
- package/dist/types/ai-agent/human-review-task.d.ts +2 -0
- package/dist/types/ai-agent/index.d.ts +3 -0
- package/dist/types/ai-agent/index.js +3 -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/ai-agent/user-ai-agent-subscription.d.ts +16 -0
- package/dist/types/ai-agent/user-ai-agent-subscription.js +2 -0
- package/dist/types/enums/index.d.ts +2 -1
- package/dist/types/enums/index.js +1 -0
- package/dist/types/user/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ export declare const agentActionLogSchema: import("zod").ZodObject<{
|
|
|
3
3
|
id: import("zod").ZodString;
|
|
4
4
|
agentSlug: import("zod").ZodString;
|
|
5
5
|
subscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6
|
+
userSubscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6
7
|
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
8
|
threadId: import("zod").ZodString;
|
|
8
9
|
propertyId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -22,6 +23,7 @@ export declare const agentActionLogSchema: import("zod").ZodObject<{
|
|
|
22
23
|
actionType: AgentActionType;
|
|
23
24
|
propertyId?: number | undefined;
|
|
24
25
|
subscriptionId?: number | undefined;
|
|
26
|
+
userSubscriptionId?: number | undefined;
|
|
25
27
|
requiresHumanReview?: boolean | undefined;
|
|
26
28
|
escalationReason?: string | undefined;
|
|
27
29
|
sessionId?: string | undefined;
|
|
@@ -36,6 +38,7 @@ export declare const agentActionLogSchema: import("zod").ZodObject<{
|
|
|
36
38
|
actionType: AgentActionType;
|
|
37
39
|
propertyId?: number | undefined;
|
|
38
40
|
subscriptionId?: number | undefined;
|
|
41
|
+
userSubscriptionId?: number | undefined;
|
|
39
42
|
requiresHumanReview?: boolean | undefined;
|
|
40
43
|
escalationReason?: string | undefined;
|
|
41
44
|
sessionId?: string | undefined;
|
|
@@ -7,6 +7,7 @@ exports.agentActionLogSchema = (0, zod_1.object)({
|
|
|
7
7
|
id: (0, zod_1.string)(),
|
|
8
8
|
agentSlug: (0, zod_1.string)(),
|
|
9
9
|
subscriptionId: (0, zod_1.number)().int().optional(),
|
|
10
|
+
userSubscriptionId: (0, zod_1.number)().int().optional(),
|
|
10
11
|
sessionId: (0, zod_1.string)().optional(),
|
|
11
12
|
threadId: (0, zod_1.string)(),
|
|
12
13
|
propertyId: (0, zod_1.number)().int().optional(),
|
|
@@ -2,8 +2,9 @@ import { AgentSessionStatus } from "../../types/enums";
|
|
|
2
2
|
export declare const agentThreadSessionSchema: import("zod").ZodObject<{
|
|
3
3
|
id: import("zod").ZodString;
|
|
4
4
|
threadId: import("zod").ZodString;
|
|
5
|
-
propertyId: import("zod").ZodNumber
|
|
5
|
+
propertyId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6
6
|
subscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
|
+
userSubscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
8
|
agentSlug: import("zod").ZodString;
|
|
8
9
|
status: import("zod").ZodNativeEnum<typeof AgentSessionStatus>;
|
|
9
10
|
totalMessages: import("zod").ZodNumber;
|
|
@@ -22,13 +23,14 @@ export declare const agentThreadSessionSchema: import("zod").ZodObject<{
|
|
|
22
23
|
status: AgentSessionStatus;
|
|
23
24
|
createdAt: Date;
|
|
24
25
|
updatedAt: Date;
|
|
25
|
-
propertyId: number;
|
|
26
26
|
threadId: string;
|
|
27
27
|
agentSlug: string;
|
|
28
28
|
totalMessages: number;
|
|
29
29
|
toolsUsed: string[];
|
|
30
30
|
requiresHumanReview: boolean;
|
|
31
|
+
propertyId?: number | undefined;
|
|
31
32
|
subscriptionId?: number | undefined;
|
|
33
|
+
userSubscriptionId?: number | undefined;
|
|
32
34
|
lastReplyAt?: Date | undefined;
|
|
33
35
|
escalationReason?: string | undefined;
|
|
34
36
|
escalatedAt?: Date | undefined;
|
|
@@ -40,13 +42,14 @@ export declare const agentThreadSessionSchema: import("zod").ZodObject<{
|
|
|
40
42
|
status: AgentSessionStatus;
|
|
41
43
|
createdAt: Date;
|
|
42
44
|
updatedAt: Date;
|
|
43
|
-
propertyId: number;
|
|
44
45
|
threadId: string;
|
|
45
46
|
agentSlug: string;
|
|
46
47
|
totalMessages: number;
|
|
47
48
|
toolsUsed: string[];
|
|
48
49
|
requiresHumanReview: boolean;
|
|
50
|
+
propertyId?: number | undefined;
|
|
49
51
|
subscriptionId?: number | undefined;
|
|
52
|
+
userSubscriptionId?: number | undefined;
|
|
50
53
|
lastReplyAt?: Date | undefined;
|
|
51
54
|
escalationReason?: string | undefined;
|
|
52
55
|
escalatedAt?: Date | undefined;
|
|
@@ -6,8 +6,9 @@ const enums_1 = require("../../types/enums");
|
|
|
6
6
|
exports.agentThreadSessionSchema = (0, zod_1.object)({
|
|
7
7
|
id: (0, zod_1.string)(),
|
|
8
8
|
threadId: (0, zod_1.string)(),
|
|
9
|
-
propertyId: (0, zod_1.number)().int(),
|
|
9
|
+
propertyId: (0, zod_1.number)().int().optional(),
|
|
10
10
|
subscriptionId: (0, zod_1.number)().int().optional(),
|
|
11
|
+
userSubscriptionId: (0, zod_1.number)().int().optional(),
|
|
11
12
|
agentSlug: (0, zod_1.string)(),
|
|
12
13
|
status: (0, zod_1.nativeEnum)(enums_1.AgentSessionStatus),
|
|
13
14
|
totalMessages: (0, zod_1.number)().int(),
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { GuestCoordinatorResponseStyle } from "../../types/enums";
|
|
2
|
+
export declare const hostCoordinatorConfigSchema: import("zod").ZodObject<{
|
|
3
|
+
id: import("zod").ZodNumber;
|
|
4
|
+
userSubscriptionId: import("zod").ZodNumber;
|
|
5
|
+
agentName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
responseStyle: import("zod").ZodNativeEnum<typeof GuestCoordinatorResponseStyle>;
|
|
7
|
+
customInstructions: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
canAnswerBillingQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
9
|
+
canAnswerSetupQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
10
|
+
canAnswerIntegrationQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
11
|
+
canAnswerCalendarQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
12
|
+
canAnswerReservationQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
13
|
+
canAnswerMaintenanceQuestions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
14
|
+
canSaveInternalNotes: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
15
|
+
blockBillingDisputes: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
16
|
+
escalateToOpsOnReview: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
17
|
+
sendEmailOnEscalation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
18
|
+
workingHoursStart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
workingHoursEnd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
timezone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
outsideHoursMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
createdAt: import("zod").ZodDate;
|
|
23
|
+
updatedAt: import("zod").ZodDate;
|
|
24
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
25
|
+
id: number;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
responseStyle: GuestCoordinatorResponseStyle;
|
|
29
|
+
userSubscriptionId: number;
|
|
30
|
+
timezone?: string | undefined;
|
|
31
|
+
agentName?: string | undefined;
|
|
32
|
+
customInstructions?: string | undefined;
|
|
33
|
+
canSaveInternalNotes?: boolean | undefined;
|
|
34
|
+
sendEmailOnEscalation?: boolean | undefined;
|
|
35
|
+
workingHoursStart?: string | undefined;
|
|
36
|
+
workingHoursEnd?: string | undefined;
|
|
37
|
+
outsideHoursMessage?: string | undefined;
|
|
38
|
+
canAnswerBillingQuestions?: boolean | undefined;
|
|
39
|
+
canAnswerSetupQuestions?: boolean | undefined;
|
|
40
|
+
canAnswerIntegrationQuestions?: boolean | undefined;
|
|
41
|
+
canAnswerCalendarQuestions?: boolean | undefined;
|
|
42
|
+
canAnswerReservationQuestions?: boolean | undefined;
|
|
43
|
+
canAnswerMaintenanceQuestions?: boolean | undefined;
|
|
44
|
+
blockBillingDisputes?: boolean | undefined;
|
|
45
|
+
escalateToOpsOnReview?: boolean | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
id: number;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
responseStyle: GuestCoordinatorResponseStyle;
|
|
51
|
+
userSubscriptionId: number;
|
|
52
|
+
timezone?: string | undefined;
|
|
53
|
+
agentName?: string | undefined;
|
|
54
|
+
customInstructions?: string | undefined;
|
|
55
|
+
canSaveInternalNotes?: boolean | undefined;
|
|
56
|
+
sendEmailOnEscalation?: boolean | undefined;
|
|
57
|
+
workingHoursStart?: string | undefined;
|
|
58
|
+
workingHoursEnd?: string | undefined;
|
|
59
|
+
outsideHoursMessage?: string | undefined;
|
|
60
|
+
canAnswerBillingQuestions?: boolean | undefined;
|
|
61
|
+
canAnswerSetupQuestions?: boolean | undefined;
|
|
62
|
+
canAnswerIntegrationQuestions?: boolean | undefined;
|
|
63
|
+
canAnswerCalendarQuestions?: boolean | undefined;
|
|
64
|
+
canAnswerReservationQuestions?: boolean | undefined;
|
|
65
|
+
canAnswerMaintenanceQuestions?: boolean | undefined;
|
|
66
|
+
blockBillingDisputes?: boolean | undefined;
|
|
67
|
+
escalateToOpsOnReview?: boolean | undefined;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hostCoordinatorConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../../types/enums");
|
|
6
|
+
exports.hostCoordinatorConfigSchema = (0, zod_1.object)({
|
|
7
|
+
id: (0, zod_1.number)().int(),
|
|
8
|
+
userSubscriptionId: (0, zod_1.number)().int(),
|
|
9
|
+
// Identity / persona
|
|
10
|
+
agentName: (0, zod_1.string)().optional(),
|
|
11
|
+
responseStyle: (0, zod_1.nativeEnum)(enums_1.GuestCoordinatorResponseStyle),
|
|
12
|
+
customInstructions: (0, zod_1.string)().optional(),
|
|
13
|
+
// Capability toggles
|
|
14
|
+
canAnswerBillingQuestions: (0, zod_1.boolean)().optional(),
|
|
15
|
+
canAnswerSetupQuestions: (0, zod_1.boolean)().optional(),
|
|
16
|
+
canAnswerIntegrationQuestions: (0, zod_1.boolean)().optional(),
|
|
17
|
+
canAnswerCalendarQuestions: (0, zod_1.boolean)().optional(),
|
|
18
|
+
canAnswerReservationQuestions: (0, zod_1.boolean)().optional(),
|
|
19
|
+
canAnswerMaintenanceQuestions: (0, zod_1.boolean)().optional(),
|
|
20
|
+
canSaveInternalNotes: (0, zod_1.boolean)().optional(),
|
|
21
|
+
// Topics that always escalate
|
|
22
|
+
blockBillingDisputes: (0, zod_1.boolean)().optional(),
|
|
23
|
+
// Escalation routing
|
|
24
|
+
escalateToOpsOnReview: (0, zod_1.boolean)().optional(),
|
|
25
|
+
sendEmailOnEscalation: (0, zod_1.boolean)().optional(),
|
|
26
|
+
// Working hours (null = 24/7)
|
|
27
|
+
workingHoursStart: (0, zod_1.string)().optional(),
|
|
28
|
+
workingHoursEnd: (0, zod_1.string)().optional(),
|
|
29
|
+
timezone: (0, zod_1.string)().optional(),
|
|
30
|
+
outsideHoursMessage: (0, zod_1.string)().optional(),
|
|
31
|
+
createdAt: (0, zod_1.date)(),
|
|
32
|
+
updatedAt: (0, zod_1.date)(),
|
|
33
|
+
});
|
|
@@ -2,8 +2,9 @@ import { HumanReviewPriority, HumanReviewStatus } from "../../types/enums";
|
|
|
2
2
|
export declare const humanReviewTaskSchema: import("zod").ZodObject<{
|
|
3
3
|
id: import("zod").ZodString;
|
|
4
4
|
threadId: import("zod").ZodString;
|
|
5
|
-
propertyId: import("zod").ZodNumber
|
|
5
|
+
propertyId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6
6
|
subscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
|
+
userSubscriptionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
8
|
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
9
|
agentSlug: import("zod").ZodString;
|
|
9
10
|
reason: import("zod").ZodString;
|
|
@@ -25,10 +26,11 @@ export declare const humanReviewTaskSchema: import("zod").ZodObject<{
|
|
|
25
26
|
status: HumanReviewStatus;
|
|
26
27
|
createdAt: Date;
|
|
27
28
|
updatedAt: Date;
|
|
28
|
-
propertyId: number;
|
|
29
29
|
threadId: string;
|
|
30
30
|
agentSlug: string;
|
|
31
|
+
propertyId?: number | undefined;
|
|
31
32
|
subscriptionId?: number | undefined;
|
|
33
|
+
userSubscriptionId?: number | undefined;
|
|
32
34
|
resolvedBy?: string | undefined;
|
|
33
35
|
resolvedAt?: Date | undefined;
|
|
34
36
|
resolutionNote?: string | undefined;
|
|
@@ -44,10 +46,11 @@ export declare const humanReviewTaskSchema: import("zod").ZodObject<{
|
|
|
44
46
|
status: HumanReviewStatus;
|
|
45
47
|
createdAt: Date;
|
|
46
48
|
updatedAt: Date;
|
|
47
|
-
propertyId: number;
|
|
48
49
|
threadId: string;
|
|
49
50
|
agentSlug: string;
|
|
51
|
+
propertyId?: number | undefined;
|
|
50
52
|
subscriptionId?: number | undefined;
|
|
53
|
+
userSubscriptionId?: number | undefined;
|
|
51
54
|
resolvedBy?: string | undefined;
|
|
52
55
|
resolvedAt?: Date | undefined;
|
|
53
56
|
resolutionNote?: string | undefined;
|
|
@@ -6,8 +6,9 @@ const enums_1 = require("../../types/enums");
|
|
|
6
6
|
exports.humanReviewTaskSchema = (0, zod_1.object)({
|
|
7
7
|
id: (0, zod_1.string)(),
|
|
8
8
|
threadId: (0, zod_1.string)(),
|
|
9
|
-
propertyId: (0, zod_1.number)().int(),
|
|
9
|
+
propertyId: (0, zod_1.number)().int().optional(),
|
|
10
10
|
subscriptionId: (0, zod_1.number)().int().optional(),
|
|
11
|
+
userSubscriptionId: (0, zod_1.number)().int().optional(),
|
|
11
12
|
sessionId: (0, zod_1.string)().optional(),
|
|
12
13
|
agentSlug: (0, zod_1.string)(),
|
|
13
14
|
reason: (0, zod_1.string)(),
|
|
@@ -4,3 +4,6 @@ export * from "./guest-coordinator-config";
|
|
|
4
4
|
export * from "./agent-thread-session";
|
|
5
5
|
export * from "./agent-action-log";
|
|
6
6
|
export * from "./human-review-task";
|
|
7
|
+
export * from "./user-ai-agent-subscription";
|
|
8
|
+
export * from "./host-coordinator-config";
|
|
9
|
+
export * from "./revenue-manager-config";
|
|
@@ -20,3 +20,6 @@ __exportStar(require("./guest-coordinator-config"), exports);
|
|
|
20
20
|
__exportStar(require("./agent-thread-session"), exports);
|
|
21
21
|
__exportStar(require("./agent-action-log"), exports);
|
|
22
22
|
__exportStar(require("./human-review-task"), exports);
|
|
23
|
+
__exportStar(require("./user-ai-agent-subscription"), exports);
|
|
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
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const userAiAgentSubscriptionSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
userId: import("zod").ZodString;
|
|
4
|
+
agentId: import("zod").ZodNumber;
|
|
5
|
+
enabled: import("zod").ZodBoolean;
|
|
6
|
+
enabledAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
7
|
+
enabledByUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
enabledByRole: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
disabledAt: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
10
|
+
disabledByUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
disabledByRole: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
createdAt: import("zod").ZodDate;
|
|
13
|
+
updatedAt: import("zod").ZodDate;
|
|
14
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
15
|
+
id: number;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
userId: string;
|
|
19
|
+
agentId: number;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
enabledAt?: Date | undefined;
|
|
22
|
+
enabledByUserId?: string | undefined;
|
|
23
|
+
enabledByRole?: string | undefined;
|
|
24
|
+
disabledAt?: Date | undefined;
|
|
25
|
+
disabledByUserId?: string | undefined;
|
|
26
|
+
disabledByRole?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
id: number;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
userId: string;
|
|
32
|
+
agentId: number;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
enabledAt?: Date | undefined;
|
|
35
|
+
enabledByUserId?: string | undefined;
|
|
36
|
+
enabledByRole?: string | undefined;
|
|
37
|
+
disabledAt?: Date | undefined;
|
|
38
|
+
disabledByUserId?: string | undefined;
|
|
39
|
+
disabledByRole?: string | undefined;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userAiAgentSubscriptionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.userAiAgentSubscriptionSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)().int(),
|
|
7
|
+
userId: (0, zod_1.string)(),
|
|
8
|
+
agentId: (0, zod_1.number)().int(),
|
|
9
|
+
enabled: (0, zod_1.boolean)(),
|
|
10
|
+
enabledAt: (0, zod_1.date)().optional(),
|
|
11
|
+
enabledByUserId: (0, zod_1.string)().optional(),
|
|
12
|
+
enabledByRole: (0, zod_1.string)().optional(),
|
|
13
|
+
disabledAt: (0, zod_1.date)().optional(),
|
|
14
|
+
disabledByUserId: (0, zod_1.string)().optional(),
|
|
15
|
+
disabledByRole: (0, zod_1.string)().optional(),
|
|
16
|
+
createdAt: (0, zod_1.date)(),
|
|
17
|
+
updatedAt: (0, zod_1.date)(),
|
|
18
|
+
});
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { infer } from "zod";
|
|
2
2
|
import { agentActionLogSchema } from "../../schemas/ai-agent";
|
|
3
3
|
import { PropertyAiAgentSubscription } from "./property-ai-agent-subscription";
|
|
4
|
+
import { UserAiAgentSubscription } from "./user-ai-agent-subscription";
|
|
4
5
|
import { AgentThreadSession } from "./agent-thread-session";
|
|
5
6
|
import { Property } from "../property";
|
|
6
7
|
export interface AgentActionLog extends infer<typeof agentActionLogSchema> {
|
|
7
8
|
subscription?: PropertyAiAgentSubscription;
|
|
9
|
+
userSubscription?: UserAiAgentSubscription;
|
|
8
10
|
session?: AgentThreadSession;
|
|
9
11
|
property?: Property;
|
|
10
12
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { infer } from "zod";
|
|
2
2
|
import { agentThreadSessionSchema } from "../../schemas/ai-agent";
|
|
3
3
|
import { PropertyAiAgentSubscription } from "./property-ai-agent-subscription";
|
|
4
|
+
import { UserAiAgentSubscription } from "./user-ai-agent-subscription";
|
|
4
5
|
import { AgentActionLog } from "./agent-action-log";
|
|
5
6
|
import { HumanReviewTask } from "./human-review-task";
|
|
6
7
|
import { Property } from "../property";
|
|
7
8
|
export interface AgentThreadSession extends infer<typeof agentThreadSessionSchema> {
|
|
8
9
|
subscription?: PropertyAiAgentSubscription;
|
|
10
|
+
userSubscription?: UserAiAgentSubscription;
|
|
9
11
|
actionLogs?: AgentActionLog[];
|
|
10
12
|
humanReviewTasks?: HumanReviewTask[];
|
|
11
13
|
property?: Property;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { infer } from "zod";
|
|
2
2
|
import { aiAgentSchema } from "../../schemas/ai-agent";
|
|
3
3
|
import { PropertyAiAgentSubscription } from "./property-ai-agent-subscription";
|
|
4
|
+
import { UserAiAgentSubscription } from "./user-ai-agent-subscription";
|
|
4
5
|
export interface AiAgent extends infer<typeof aiAgentSchema> {
|
|
5
6
|
subscriptions?: PropertyAiAgentSubscription[];
|
|
7
|
+
userSubscriptions?: UserAiAgentSubscription[];
|
|
6
8
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { hostCoordinatorConfigSchema } from "../../schemas/ai-agent";
|
|
3
|
+
import { UserAiAgentSubscription } from "./user-ai-agent-subscription";
|
|
4
|
+
export interface HostCoordinatorConfig extends infer<typeof hostCoordinatorConfigSchema> {
|
|
5
|
+
userSubscription?: UserAiAgentSubscription;
|
|
6
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { infer } from "zod";
|
|
2
2
|
import { humanReviewTaskSchema } from "../../schemas/ai-agent";
|
|
3
3
|
import { PropertyAiAgentSubscription } from "./property-ai-agent-subscription";
|
|
4
|
+
import { UserAiAgentSubscription } from "./user-ai-agent-subscription";
|
|
4
5
|
import { AgentThreadSession } from "./agent-thread-session";
|
|
5
6
|
import { Property } from "../property";
|
|
6
7
|
export interface HumanReviewTask extends infer<typeof humanReviewTaskSchema> {
|
|
7
8
|
subscription?: PropertyAiAgentSubscription;
|
|
9
|
+
userSubscription?: UserAiAgentSubscription;
|
|
8
10
|
session?: AgentThreadSession;
|
|
9
11
|
property?: Property;
|
|
10
12
|
}
|
|
@@ -4,3 +4,6 @@ export * from "./guest-coordinator-config";
|
|
|
4
4
|
export * from "./agent-thread-session";
|
|
5
5
|
export * from "./agent-action-log";
|
|
6
6
|
export * from "./human-review-task";
|
|
7
|
+
export * from "./user-ai-agent-subscription";
|
|
8
|
+
export * from "./host-coordinator-config";
|
|
9
|
+
export * from "./revenue-manager-config";
|
|
@@ -20,3 +20,6 @@ __exportStar(require("./guest-coordinator-config"), exports);
|
|
|
20
20
|
__exportStar(require("./agent-thread-session"), exports);
|
|
21
21
|
__exportStar(require("./agent-action-log"), exports);
|
|
22
22
|
__exportStar(require("./human-review-task"), exports);
|
|
23
|
+
__exportStar(require("./user-ai-agent-subscription"), exports);
|
|
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,16 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { userAiAgentSubscriptionSchema } from "../../schemas/ai-agent";
|
|
3
|
+
import { User } from "../user";
|
|
4
|
+
import { AiAgent } from "./ai-agent";
|
|
5
|
+
import { HostCoordinatorConfig } from "./host-coordinator-config";
|
|
6
|
+
import { AgentThreadSession } from "./agent-thread-session";
|
|
7
|
+
import { AgentActionLog } from "./agent-action-log";
|
|
8
|
+
import { HumanReviewTask } from "./human-review-task";
|
|
9
|
+
export interface UserAiAgentSubscription extends infer<typeof userAiAgentSubscriptionSchema> {
|
|
10
|
+
user?: User;
|
|
11
|
+
agent?: AiAgent;
|
|
12
|
+
hostCoordinatorConfig?: HostCoordinatorConfig;
|
|
13
|
+
threadSessions?: AgentThreadSession[];
|
|
14
|
+
actionLogs?: AgentActionLog[];
|
|
15
|
+
humanReviewTasks?: HumanReviewTask[];
|
|
16
|
+
}
|
|
@@ -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) {
|
|
@@ -16,6 +16,7 @@ import { BankAccount } from "../bank-account";
|
|
|
16
16
|
import { CustomBundle } from "../custom-bundle";
|
|
17
17
|
import { BundleCoupon } from "../custom-bundle-coupon";
|
|
18
18
|
import { PendingPaymentAction } from "../pending-payment-action";
|
|
19
|
+
import { UserAiAgentSubscription } from "../ai-agent/user-ai-agent-subscription";
|
|
19
20
|
export interface User extends infer<typeof userSchema> {
|
|
20
21
|
tier?: Tier;
|
|
21
22
|
properties?: Property[];
|
|
@@ -37,4 +38,5 @@ export interface User extends infer<typeof userSchema> {
|
|
|
37
38
|
createdBundles?: CustomBundle[];
|
|
38
39
|
createdCoupons?: BundleCoupon[];
|
|
39
40
|
pendingPaymentActions?: PendingPaymentAction[];
|
|
41
|
+
aiAgentSubscriptions?: UserAiAgentSubscription[];
|
|
40
42
|
}
|