wiil-core-js 0.0.82
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/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/core/account/index.d.ts +7 -0
- package/dist/core/account/index.js +23 -0
- package/dist/core/account/organization.schema.d.ts +118 -0
- package/dist/core/account/organization.schema.js +91 -0
- package/dist/core/account/project.schema.d.ts +121 -0
- package/dist/core/account/project.schema.js +102 -0
- package/dist/core/account/supported-business-verticals.d.ts +8 -0
- package/dist/core/account/supported-business-verticals.js +23 -0
- package/dist/core/assistant-setups/assistant-setup-result.schema.d.ts +115 -0
- package/dist/core/assistant-setups/assistant-setup-result.schema.js +17 -0
- package/dist/core/assistant-setups/base-assistant-setup.schema.d.ts +61 -0
- package/dist/core/assistant-setups/base-assistant-setup.schema.js +29 -0
- package/dist/core/assistant-setups/index.d.ts +4 -0
- package/dist/core/assistant-setups/index.js +21 -0
- package/dist/core/assistant-setups/phone-assistant-setup.schema.d.ts +63 -0
- package/dist/core/assistant-setups/phone-assistant-setup.schema.js +14 -0
- package/dist/core/assistant-setups/web-assitant-setup.schema.d.ts +56 -0
- package/dist/core/assistant-setups/web-assitant-setup.schema.js +17 -0
- package/dist/core/base.schema.d.ts +34 -0
- package/dist/core/base.schema.js +36 -0
- package/dist/core/business-mgt/appointment-additional-info.schema.d.ts +63 -0
- package/dist/core/business-mgt/appointment-additional-info.schema.js +53 -0
- package/dist/core/business-mgt/appointment-field-config.schema.d.ts +251 -0
- package/dist/core/business-mgt/appointment-field-config.schema.js +49 -0
- package/dist/core/business-mgt/bookings.shared.schema.d.ts +47 -0
- package/dist/core/business-mgt/bookings.shared.schema.js +60 -0
- package/dist/core/business-mgt/business-location.schema.d.ts +327 -0
- package/dist/core/business-mgt/business-location.schema.js +176 -0
- package/dist/core/business-mgt/customer-management/customer-group.schema.d.ts +87 -0
- package/dist/core/business-mgt/customer-management/customer-group.schema.js +53 -0
- package/dist/core/business-mgt/customer-management/customer.schema.d.ts +156 -0
- package/dist/core/business-mgt/customer-management/customer.schema.js +93 -0
- package/dist/core/business-mgt/customer-management/index.d.ts +7 -0
- package/dist/core/business-mgt/customer-management/index.js +23 -0
- package/dist/core/business-mgt/customer-management/shipping-address.schema.d.ts +112 -0
- package/dist/core/business-mgt/customer-management/shipping-address.schema.js +79 -0
- package/dist/core/business-mgt/customer.schema.d.ts +111 -0
- package/dist/core/business-mgt/customer.schema.js +73 -0
- package/dist/core/business-mgt/discount-rule.schema.d.ts +183 -0
- package/dist/core/business-mgt/discount-rule.schema.js +108 -0
- package/dist/core/business-mgt/index.d.ts +16 -0
- package/dist/core/business-mgt/index.js +38 -0
- package/dist/core/business-mgt/menu-config.schema.d.ts +165 -0
- package/dist/core/business-mgt/menu-config.schema.js +86 -0
- package/dist/core/business-mgt/menu-management/index.d.ts +11 -0
- package/dist/core/business-mgt/menu-management/index.js +27 -0
- package/dist/core/business-mgt/menu-management/menu-catalog.schema.d.ts +386 -0
- package/dist/core/business-mgt/menu-management/menu-catalog.schema.js +58 -0
- package/dist/core/business-mgt/menu-management/menu-config.schema.d.ts +301 -0
- package/dist/core/business-mgt/menu-management/menu-config.schema.js +169 -0
- package/dist/core/business-mgt/menu-management/menu-item-variant.schema.d.ts +143 -0
- package/dist/core/business-mgt/menu-management/menu-item-variant.schema.js +86 -0
- package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.d.ts +239 -0
- package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.js +117 -0
- package/dist/core/business-mgt/menu-management/menu-set.schema.d.ts +420 -0
- package/dist/core/business-mgt/menu-management/menu-set.schema.js +283 -0
- package/dist/core/business-mgt/menu-management/menu.order.schema.d.ts +654 -0
- package/dist/core/business-mgt/menu-management/menu.order.schema.js +204 -0
- package/dist/core/business-mgt/menu-management/modifier.schema.d.ts +585 -0
- package/dist/core/business-mgt/menu-management/modifier.schema.js +341 -0
- package/dist/core/business-mgt/menu.order.schema.d.ts +335 -0
- package/dist/core/business-mgt/menu.order.schema.js +149 -0
- package/dist/core/business-mgt/order.schema.d.ts +222 -0
- package/dist/core/business-mgt/order.schema.js +205 -0
- package/dist/core/business-mgt/pricing-rule.shared.schema.d.ts +56 -0
- package/dist/core/business-mgt/pricing-rule.shared.schema.js +68 -0
- package/dist/core/business-mgt/product-config.schema.d.ts +177 -0
- package/dist/core/business-mgt/product-config.schema.js +106 -0
- package/dist/core/business-mgt/product-management/index.d.ts +12 -0
- package/dist/core/business-mgt/product-management/index.js +28 -0
- package/dist/core/business-mgt/product-management/product-axis-binding.schema.d.ts +54 -0
- package/dist/core/business-mgt/product-management/product-axis-binding.schema.js +54 -0
- package/dist/core/business-mgt/product-management/product-config.schema.d.ts +1042 -0
- package/dist/core/business-mgt/product-management/product-config.schema.js +392 -0
- package/dist/core/business-mgt/product-management/product-display.schema.d.ts +548 -0
- package/dist/core/business-mgt/product-management/product-display.schema.js +80 -0
- package/dist/core/business-mgt/product-management/product-order.schema.d.ts +493 -0
- package/dist/core/business-mgt/product-management/product-order.schema.js +158 -0
- package/dist/core/business-mgt/product-management/product-pricing-rule.schema.d.ts +167 -0
- package/dist/core/business-mgt/product-management/product-pricing-rule.schema.js +68 -0
- package/dist/core/business-mgt/product-management/product-set.schema.d.ts +488 -0
- package/dist/core/business-mgt/product-management/product-set.schema.js +273 -0
- package/dist/core/business-mgt/product-management/product-variant-axis.schema.d.ts +156 -0
- package/dist/core/business-mgt/product-management/product-variant-axis.schema.js +98 -0
- package/dist/core/business-mgt/product-management/product-variant.schema.d.ts +219 -0
- package/dist/core/business-mgt/product-management/product-variant.schema.js +130 -0
- package/dist/core/business-mgt/product-order.schema.d.ts +326 -0
- package/dist/core/business-mgt/product-order.schema.js +153 -0
- package/dist/core/business-mgt/property-config.schema.d.ts +621 -0
- package/dist/core/business-mgt/property-config.schema.js +224 -0
- package/dist/core/business-mgt/property-inquiry.schema.d.ts +222 -0
- package/dist/core/business-mgt/property-inquiry.schema.js +112 -0
- package/dist/core/business-mgt/property-management/index.d.ts +6 -0
- package/dist/core/business-mgt/property-management/index.js +22 -0
- package/dist/core/business-mgt/property-management/property-config.schema.d.ts +1306 -0
- package/dist/core/business-mgt/property-management/property-config.schema.js +367 -0
- package/dist/core/business-mgt/property-management/property-inquiry.schema.d.ts +254 -0
- package/dist/core/business-mgt/property-management/property-inquiry.schema.js +131 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/index.d.ts +3 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/index.js +19 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.d.ts +139 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.js +90 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.d.ts +104 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.js +70 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.d.ts +104 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.js +72 -0
- package/dist/core/business-mgt/reservation-mgt/index.d.ts +14 -0
- package/dist/core/business-mgt/reservation-mgt/index.js +31 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.d.ts +180 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.js +75 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.d.ts +91 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.js +57 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.d.ts +334 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.js +179 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.d.ts +195 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.js +106 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.d.ts +402 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.js +198 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.d.ts +229 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.js +127 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.d.ts +382 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.js +322 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.d.ts +123 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.js +83 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.d.ts +167 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.js +84 -0
- package/dist/core/business-mgt/reservation-mgt/reservation.schema.d.ts +0 -0
- package/dist/core/business-mgt/reservation-mgt/reservation.schema.js +153 -0
- package/dist/core/business-mgt/reservation-mgt/resource/index.d.ts +4 -0
- package/dist/core/business-mgt/reservation-mgt/resource/index.js +20 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.d.ts +157 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.js +76 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.d.ts +137 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.js +94 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.d.ts +713 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.js +363 -0
- package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.d.ts +151 -0
- package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.js +147 -0
- package/dist/core/business-mgt/reservation-resource.schema.d.ts +154 -0
- package/dist/core/business-mgt/reservation-resource.schema.js +100 -0
- package/dist/core/business-mgt/reservation.schema.d.ts +119 -0
- package/dist/core/business-mgt/reservation.schema.js +89 -0
- package/dist/core/business-mgt/service-appointment.schema.d.ts +105 -0
- package/dist/core/business-mgt/service-appointment.schema.js +69 -0
- package/dist/core/business-mgt/service-config.schema.d.ts +453 -0
- package/dist/core/business-mgt/service-config.schema.js +102 -0
- package/dist/core/business-mgt/service-management/appointment-additional-info.schema.d.ts +110 -0
- package/dist/core/business-mgt/service-management/appointment-additional-info.schema.js +78 -0
- package/dist/core/business-mgt/service-management/appointment-field-config.schema.d.ts +304 -0
- package/dist/core/business-mgt/service-management/appointment-field-config.schema.js +75 -0
- package/dist/core/business-mgt/service-management/business-service-config.schema.d.ts +1226 -0
- package/dist/core/business-mgt/service-management/business-service-config.schema.js +317 -0
- package/dist/core/business-mgt/service-management/index.d.ts +13 -0
- package/dist/core/business-mgt/service-management/index.js +29 -0
- package/dist/core/business-mgt/service-management/service-appointment.schema.d.ts +531 -0
- package/dist/core/business-mgt/service-management/service-appointment.schema.js +116 -0
- package/dist/core/business-mgt/service-management/service-person.schema.d.ts +122 -0
- package/dist/core/business-mgt/service-management/service-person.schema.js +66 -0
- package/dist/core/business-mgt/service-management/service-pricing-rule.schema.d.ts +221 -0
- package/dist/core/business-mgt/service-management/service-pricing-rule.schema.js +118 -0
- package/dist/core/business-mgt/service-management/service-provider.schema.d.ts +90 -0
- package/dist/core/business-mgt/service-management/service-provider.schema.js +54 -0
- package/dist/core/business-mgt/service-management/service-slot-query.schema.d.ts +90 -0
- package/dist/core/business-mgt/service-management/service-slot-query.schema.js +113 -0
- package/dist/core/business-mgt/service-management/service-time-off.schema.d.ts +121 -0
- package/dist/core/business-mgt/service-management/service-time-off.schema.js +95 -0
- package/dist/core/business-mgt/service-person.schema.d.ts +43 -0
- package/dist/core/business-mgt/service-person.schema.js +38 -0
- package/dist/core/business-mgt/tax-rule.schema.d.ts +161 -0
- package/dist/core/business-mgt/tax-rule.schema.js +90 -0
- package/dist/core/conversation/conversation-config.schema.d.ts +644 -0
- package/dist/core/conversation/conversation-config.schema.js +351 -0
- package/dist/core/conversation/conversation-message.schema.d.ts +307 -0
- package/dist/core/conversation/conversation-message.schema.js +275 -0
- package/dist/core/conversation/index.d.ts +12 -0
- package/dist/core/conversation/index.js +28 -0
- package/dist/core/conversation/outbound-call.schema.d.ts +209 -0
- package/dist/core/conversation/outbound-call.schema.js +116 -0
- package/dist/core/conversation/outbound-email.schema.d.ts +338 -0
- package/dist/core/conversation/outbound-email.schema.js +150 -0
- package/dist/core/conversation/outbound-sms.schema.d.ts +163 -0
- package/dist/core/conversation/outbound-sms.schema.js +85 -0
- package/dist/core/conversation/outbound-template.schema.d.ts +375 -0
- package/dist/core/conversation/outbound-template.schema.js +160 -0
- package/dist/core/conversation/translation-config.schema.d.ts +92 -0
- package/dist/core/conversation/translation-config.schema.js +88 -0
- package/dist/core/conversation/translation-conversation.schema.d.ts +469 -0
- package/dist/core/conversation/translation-conversation.schema.js +175 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +30 -0
- package/dist/core/service-configuration/agent-config.schema.d.ts +236 -0
- package/dist/core/service-configuration/agent-config.schema.js +152 -0
- package/dist/core/service-configuration/base-agent-setup.d.ts +147 -0
- package/dist/core/service-configuration/base-agent-setup.js +123 -0
- package/dist/core/service-configuration/call-transfer-config.schema.d.ts +60 -0
- package/dist/core/service-configuration/call-transfer-config.schema.js +53 -0
- package/dist/core/service-configuration/deployment-config.schema.d.ts +522 -0
- package/dist/core/service-configuration/deployment-config.schema.js +271 -0
- package/dist/core/service-configuration/dynamic_setup/base-agent-setup.d.ts +130 -0
- package/dist/core/service-configuration/dynamic_setup/base-agent-setup.js +110 -0
- package/dist/core/service-configuration/dynamic_setup/index.d.ts +10 -0
- package/dist/core/service-configuration/dynamic_setup/index.js +26 -0
- package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.d.ts +111 -0
- package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.js +56 -0
- package/dist/core/service-configuration/dynamic_setup/web-agent-setup.d.ts +113 -0
- package/dist/core/service-configuration/dynamic_setup/web-agent-setup.js +55 -0
- package/dist/core/service-configuration/index.d.ts +17 -0
- package/dist/core/service-configuration/index.js +33 -0
- package/dist/core/service-configuration/instruction-config.schema.d.ts +183 -0
- package/dist/core/service-configuration/instruction-config.schema.js +139 -0
- package/dist/core/service-configuration/interaction-channels.schema.d.ts +469 -0
- package/dist/core/service-configuration/interaction-channels.schema.js +390 -0
- package/dist/core/service-configuration/knowledge.schema.d.ts +107 -0
- package/dist/core/service-configuration/knowledge.schema.js +106 -0
- package/dist/core/service-configuration/phone-config.schema.d.ts +206 -0
- package/dist/core/service-configuration/phone-config.schema.js +121 -0
- package/dist/core/service-configuration/phone-number.schema.d.ts +236 -0
- package/dist/core/service-configuration/phone-number.schema.js +211 -0
- package/dist/core/service-configuration/provisioning-config.d.ts +429 -0
- package/dist/core/service-configuration/provisioning-config.js +307 -0
- package/dist/core/service-configuration/support-llm.d.ts +95 -0
- package/dist/core/service-configuration/support-llm.js +76 -0
- package/dist/core/service-configuration/voice-language.schema.d.ts +200 -0
- package/dist/core/service-configuration/voice-language.schema.js +166 -0
- package/dist/core/type-definitions/account-definitions.d.ts +82 -0
- package/dist/core/type-definitions/account-definitions.js +88 -0
- package/dist/core/type-definitions/business-definitions.d.ts +394 -0
- package/dist/core/type-definitions/business-definitions.js +447 -0
- package/dist/core/type-definitions/conversation.type.definition.d.ts +223 -0
- package/dist/core/type-definitions/conversation.type.definition.js +236 -0
- package/dist/core/type-definitions/display-order.d.ts +154 -0
- package/dist/core/type-definitions/display-order.js +154 -0
- package/dist/core/type-definitions/dynamic-fields/field-definition.schema.d.ts +165 -0
- package/dist/core/type-definitions/dynamic-fields/field-definition.schema.js +97 -0
- package/dist/core/type-definitions/dynamic-fields/field-types.d.ts +49 -0
- package/dist/core/type-definitions/dynamic-fields/field-types.js +104 -0
- package/dist/core/type-definitions/dynamic-fields/index.d.ts +9 -0
- package/dist/core/type-definitions/dynamic-fields/index.js +25 -0
- package/dist/core/type-definitions/index.d.ts +10 -0
- package/dist/core/type-definitions/index.js +26 -0
- package/dist/core/type-definitions/knowledge-definitions.d.ts +30 -0
- package/dist/core/type-definitions/knowledge-definitions.js +37 -0
- package/dist/core/type-definitions/service-config.definitions.d.ts +112 -0
- package/dist/core/type-definitions/service-config.definitions.js +135 -0
- package/dist/core/validators/channel-validation.d.ts +19 -0
- package/dist/core/validators/channel-validation.js +40 -0
- package/dist/core/validators/index.d.ts +5 -0
- package/dist/core/validators/index.js +21 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +24 -0
- package/dist/request/index.d.ts +5 -0
- package/dist/request/index.js +21 -0
- package/dist/request/models/index.d.ts +6 -0
- package/dist/request/models/index.js +22 -0
- package/dist/request/models/paginated-quest.schema.d.ts +33 -0
- package/dist/request/models/paginated-quest.schema.js +35 -0
- package/dist/request/models/paginated-result.schema.d.ts +124 -0
- package/dist/request/models/paginated-result.schema.js +94 -0
- package/package.json +43 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BusinessPropertyCatalogSchema = exports.PropertyCatalogSchema = exports.UpdatePropertySchema = exports.CreatePropertySchema = exports.UpdatePropertyAddressSchema = exports.CreatePropertyAddressSchema = exports.UpdatePropertyCategorySchema = exports.CreatePropertyCategorySchema = exports.PropertySchema = exports.PropertyFeaturesSchema = exports.PropertyAddressSchema = exports.PropertyCategorySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const base_schema_1 = require("../base.schema");
|
|
9
|
+
const type_definitions_1 = require("../type-definitions");
|
|
10
|
+
/**
|
|
11
|
+
* @fileoverview Property configuration schema definitions for real estate management.
|
|
12
|
+
* @module business-mgt/property-config
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Property category schema.
|
|
16
|
+
*
|
|
17
|
+
* @typedef {Object} PropertyCategory
|
|
18
|
+
* @property {string} name - Category name (e.g., Luxury Homes, Commercial Offices)
|
|
19
|
+
* @property {string} [description] - Category description
|
|
20
|
+
* @property {PropertyType} propertyType - Type of property (residential, commercial, land)
|
|
21
|
+
* @property {number} [displayOrder] - Display order in listing
|
|
22
|
+
* @property {boolean} isDefault - Whether this is the default category
|
|
23
|
+
*/
|
|
24
|
+
exports.PropertyCategorySchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
25
|
+
name: zod_1.default.string().min(1, "Category name is required").describe("Category name (e.g., Luxury Homes, Commercial Offices)"),
|
|
26
|
+
description: zod_1.default.string().optional().describe("Category description"),
|
|
27
|
+
propertyType: zod_1.default.enum(type_definitions_1.PropertyType).describe("Type of property (residential, commercial, land)"),
|
|
28
|
+
displayOrder: zod_1.default.number().int().optional().describe("Display order in listing")
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Property address schema (standalone entity).
|
|
32
|
+
*
|
|
33
|
+
* @typedef {Object} PropertyAddress
|
|
34
|
+
* @property {string} street - Street address
|
|
35
|
+
* @property {string} [unit] - Unit or apartment number
|
|
36
|
+
* @property {string} city - City name
|
|
37
|
+
* @property {string} state - State or province
|
|
38
|
+
* @property {string} [postalCode] - Postal or ZIP code
|
|
39
|
+
* @property {string} country - Country
|
|
40
|
+
* @property {Object} [coordinates] - Geographic coordinates
|
|
41
|
+
* @property {string} [neighborhood] - Neighborhood or district name
|
|
42
|
+
* @property {string} [district] - Administrative district
|
|
43
|
+
* @property {boolean} isVerified - Whether address has been verified
|
|
44
|
+
* @property {number} [verifiedAt] - Timestamp when address was verified
|
|
45
|
+
* @property {string} [primaryUserAccountId] - User account managing the property
|
|
46
|
+
*/
|
|
47
|
+
exports.PropertyAddressSchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
48
|
+
street: zod_1.default.string().min(1, "Street address is required").describe("Street address"),
|
|
49
|
+
unit: zod_1.default.string().nullable().optional().describe("Unit or apartment number"),
|
|
50
|
+
city: zod_1.default.string().min(1, "City is required").describe("City name"),
|
|
51
|
+
state: zod_1.default.string().min(1, "State is required").describe("State or province"),
|
|
52
|
+
postalCode: zod_1.default.string().nullable().optional().describe("Postal or ZIP code"),
|
|
53
|
+
country: zod_1.default.string().min(1, "Country is required").describe("Country"),
|
|
54
|
+
coordinates: zod_1.default.object({
|
|
55
|
+
latitude: zod_1.default.number().min(-90).max(90).describe("Latitude coordinate"),
|
|
56
|
+
longitude: zod_1.default.number().min(-180).max(180).describe("Longitude coordinate"),
|
|
57
|
+
}).nullable().optional().describe("Geographic coordinates"),
|
|
58
|
+
neighborhood: zod_1.default.string().nullable().optional().describe("Neighborhood or district name"),
|
|
59
|
+
district: zod_1.default.string().nullable().optional().describe("Administrative district"),
|
|
60
|
+
isVerified: zod_1.default.boolean().default(false).describe("Whether address has been verified"),
|
|
61
|
+
verifiedAt: zod_1.default.number().nullable().optional().describe("Timestamp when address was verified"),
|
|
62
|
+
primaryUserAccountId: zod_1.default.string().nullable().optional().describe("User account managing the property at this address"),
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Property features schema.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {Object} PropertyFeatures
|
|
68
|
+
* @property {number} [bedrooms] - Number of bedrooms
|
|
69
|
+
* @property {number} [bathrooms] - Number of bathrooms
|
|
70
|
+
* @property {number} [parkingSpaces] - Number of parking spaces
|
|
71
|
+
* @property {number} [squareFootage] - Total square footage
|
|
72
|
+
* @property {number} [lotSize] - Lot size
|
|
73
|
+
* @property {string} lotSizeUnit - Unit for lot size (sqft, acres, sqm, hectares)
|
|
74
|
+
* @property {number} [yearBuilt] - Year the property was built
|
|
75
|
+
* @property {number} [floors] - Number of floors
|
|
76
|
+
* @property {string[]} amenities - List of amenities
|
|
77
|
+
* @property {string[]} utilities - Available utilities
|
|
78
|
+
*/
|
|
79
|
+
exports.PropertyFeaturesSchema = zod_1.default.object({
|
|
80
|
+
bedrooms: zod_1.default.number().int().nonnegative().nullable().optional().describe("Number of bedrooms"),
|
|
81
|
+
bathrooms: zod_1.default.number().nonnegative().nullable().optional().describe("Number of bathrooms"),
|
|
82
|
+
parkingSpaces: zod_1.default.number().int().nonnegative().nullable().optional().describe("Number of parking spaces"),
|
|
83
|
+
squareFootage: zod_1.default.number().positive().nullable().optional().describe("Total square footage"),
|
|
84
|
+
lotSize: zod_1.default.number().positive().nullable().optional().describe("Lot size in square feet or acres"),
|
|
85
|
+
lotSizeUnit: zod_1.default.enum(['sqft', 'acres', 'sqm', 'hectares']).default('sqft').describe("Unit for lot size"),
|
|
86
|
+
yearBuilt: zod_1.default.number().int().min(1800).max(2100).nullable().optional().describe("Year the property was built"),
|
|
87
|
+
floors: zod_1.default.number().int().positive().nullable().optional().describe("Number of floors"),
|
|
88
|
+
amenities: zod_1.default.array(zod_1.default.string()).default([]).describe("List of amenities (pool, gym, etc.)"),
|
|
89
|
+
utilities: zod_1.default.array(zod_1.default.string()).default([]).describe("Available utilities (gas, electric, water, etc.)"),
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* Main property schema for real estate listings.
|
|
93
|
+
*
|
|
94
|
+
* @typedef {Object} Property
|
|
95
|
+
* @property {string} categoryId - ID of the category this property belongs to
|
|
96
|
+
* @property {Object} [category] - Property category (populated)
|
|
97
|
+
* @property {string} title - Property listing title
|
|
98
|
+
* @property {string} [description] - Detailed property description
|
|
99
|
+
* @property {PropertyType} propertyType - Type of property
|
|
100
|
+
* @property {PropertySubType} propertySubType - Subtype of property
|
|
101
|
+
* @property {string} addressId - ID of the property address
|
|
102
|
+
* @property {Object} [address] - Property address (populated)
|
|
103
|
+
* @property {ListingType} listingType - Type of listing (sale, rent, or both)
|
|
104
|
+
* @property {ListingStatus} listingStatus - Current listing status
|
|
105
|
+
* @property {number} [salePrice] - Sale price
|
|
106
|
+
* @property {string} salePriceCurrency - Currency for sale price
|
|
107
|
+
* @property {number} [rentalPrice] - Rental price
|
|
108
|
+
* @property {RentalPeriod} [rentalPeriod] - Rental period
|
|
109
|
+
* @property {string} rentalPriceCurrency - Currency for rental price
|
|
110
|
+
* @property {boolean} priceNegotiable - Whether price is negotiable
|
|
111
|
+
* @property {Object} [features] - Property features
|
|
112
|
+
* @property {PropertyCondition} [condition] - Property condition
|
|
113
|
+
* @property {boolean} furnished - Whether property is furnished
|
|
114
|
+
* @property {string[]} images - Array of image URLs
|
|
115
|
+
* @property {string} [virtualTourUrl] - Virtual tour URL
|
|
116
|
+
* @property {string} [videoUrl] - Video tour URL
|
|
117
|
+
* @property {number} [availableFrom] - Available from date (timestamp)
|
|
118
|
+
* @property {number} [availableTo] - Available until date (timestamp)
|
|
119
|
+
* @property {boolean} isActive - Whether property is active in listings
|
|
120
|
+
* @property {boolean} isFeatured - Whether property is featured
|
|
121
|
+
* @property {boolean} isVerified - Whether property has been verified
|
|
122
|
+
* @property {string} [externalId] - External system reference ID
|
|
123
|
+
* @property {string} [mlsNumber] - MLS listing number
|
|
124
|
+
*/
|
|
125
|
+
exports.PropertySchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
126
|
+
categoryId: zod_1.default.string().describe("ID of the category this property belongs to"),
|
|
127
|
+
category: exports.PropertyCategorySchema.optional().describe("Property category"),
|
|
128
|
+
// Basic Info
|
|
129
|
+
title: zod_1.default.string().min(1, "Property title is required").describe("Property listing title"),
|
|
130
|
+
description: zod_1.default.string().optional().describe("Detailed property description"),
|
|
131
|
+
propertyType: zod_1.default.enum(type_definitions_1.PropertyType).describe("Type of property"),
|
|
132
|
+
propertySubType: zod_1.default.enum(type_definitions_1.PropertySubType).describe("Subtype of property"),
|
|
133
|
+
// Location
|
|
134
|
+
addressId: zod_1.default.string().describe("ID of the property address"),
|
|
135
|
+
address: exports.PropertyAddressSchema.nullable().optional().describe("Property address (populated)"),
|
|
136
|
+
// Listing Info
|
|
137
|
+
listingType: zod_1.default.enum(type_definitions_1.ListingType).describe("Type of listing (sale, rent, or both)"),
|
|
138
|
+
listingStatus: zod_1.default.enum(type_definitions_1.ListingStatus).default(type_definitions_1.ListingStatus.DRAFT).describe("Current listing status"),
|
|
139
|
+
// Sale Pricing
|
|
140
|
+
salePrice: zod_1.default.number().nonnegative().nullable().optional().describe("Sale price"),
|
|
141
|
+
salePriceCurrency: zod_1.default.string().default('USD').describe("Currency for sale price"),
|
|
142
|
+
// Rental Pricing
|
|
143
|
+
rentalPrice: zod_1.default.number().nonnegative().nullable().optional().describe("Rental price"),
|
|
144
|
+
rentalPeriod: zod_1.default.enum(type_definitions_1.RentalPeriod).nullable().optional().describe("Rental period (daily, weekly, monthly, yearly)"),
|
|
145
|
+
rentalPriceCurrency: zod_1.default.string().default('USD').describe("Currency for rental price"),
|
|
146
|
+
// Pricing Options
|
|
147
|
+
priceNegotiable: zod_1.default.boolean().default(false).describe("Whether price is negotiable"),
|
|
148
|
+
// Features
|
|
149
|
+
features: exports.PropertyFeaturesSchema.optional().describe("Property features"),
|
|
150
|
+
// Condition
|
|
151
|
+
condition: zod_1.default.enum(type_definitions_1.PropertyCondition).nullable().optional().describe("Property condition"),
|
|
152
|
+
furnished: zod_1.default.boolean().default(false).describe("Whether property is furnished"),
|
|
153
|
+
// Media
|
|
154
|
+
images: zod_1.default.array(zod_1.default.string()).default([]).describe("Array of image URLs"),
|
|
155
|
+
virtualTourUrl: zod_1.default.url().nullable().optional().describe("Virtual tour URL"),
|
|
156
|
+
videoUrl: zod_1.default.url().nullable().optional().describe("Video tour URL"),
|
|
157
|
+
// Availability
|
|
158
|
+
availableFrom: zod_1.default.number().nullable().optional().describe("Available from date (timestamp)"),
|
|
159
|
+
availableTo: zod_1.default.number().nullable().optional().describe("Available until date (timestamp) - for rentals"),
|
|
160
|
+
// Flags
|
|
161
|
+
isActive: zod_1.default.boolean().default(true).describe("Whether property is active in listings"),
|
|
162
|
+
isFeatured: zod_1.default.boolean().default(false).describe("Whether property is featured"),
|
|
163
|
+
isVerified: zod_1.default.boolean().default(false).describe("Whether property has been verified"),
|
|
164
|
+
// Reference
|
|
165
|
+
externalId: zod_1.default.string().nullable().optional().describe("External system reference ID"),
|
|
166
|
+
mlsNumber: zod_1.default.string().nullable().optional().describe("MLS listing number"),
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
* Schema for creating a new property category.
|
|
170
|
+
* Omits auto-generated fields.
|
|
171
|
+
*/
|
|
172
|
+
exports.CreatePropertyCategorySchema = exports.PropertyCategorySchema.omit({
|
|
173
|
+
id: true,
|
|
174
|
+
createdAt: true,
|
|
175
|
+
updatedAt: true,
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* Schema for updating an existing property category.
|
|
179
|
+
* All fields are optional except id.
|
|
180
|
+
*/
|
|
181
|
+
exports.UpdatePropertyCategorySchema = exports.CreatePropertyCategorySchema.partial().safeExtend({
|
|
182
|
+
id: zod_1.default.string(),
|
|
183
|
+
});
|
|
184
|
+
/**
|
|
185
|
+
* Schema for creating a new property address.
|
|
186
|
+
* Omits auto-generated fields.
|
|
187
|
+
*/
|
|
188
|
+
exports.CreatePropertyAddressSchema = exports.PropertyAddressSchema.omit({
|
|
189
|
+
id: true,
|
|
190
|
+
createdAt: true,
|
|
191
|
+
updatedAt: true,
|
|
192
|
+
verifiedAt: true,
|
|
193
|
+
});
|
|
194
|
+
/**
|
|
195
|
+
* Schema for updating an existing property address.
|
|
196
|
+
* All fields are optional except id.
|
|
197
|
+
*/
|
|
198
|
+
exports.UpdatePropertyAddressSchema = exports.CreatePropertyAddressSchema.partial().safeExtend({
|
|
199
|
+
id: zod_1.default.string(),
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* Schema for creating a new property listing.
|
|
203
|
+
* Omits auto-generated fields and populated objects.
|
|
204
|
+
*/
|
|
205
|
+
exports.CreatePropertySchema = exports.PropertySchema.omit({
|
|
206
|
+
id: true,
|
|
207
|
+
createdAt: true,
|
|
208
|
+
updatedAt: true,
|
|
209
|
+
category: true,
|
|
210
|
+
address: true,
|
|
211
|
+
});
|
|
212
|
+
/**
|
|
213
|
+
* Schema for updating an existing property listing.
|
|
214
|
+
* All fields are optional except id.
|
|
215
|
+
*/
|
|
216
|
+
exports.UpdatePropertySchema = exports.CreatePropertySchema.partial().safeExtend({
|
|
217
|
+
id: zod_1.default.string(),
|
|
218
|
+
});
|
|
219
|
+
// Catalog Schema
|
|
220
|
+
exports.PropertyCatalogSchema = zod_1.default.object({
|
|
221
|
+
propertyCategory: exports.PropertyCategorySchema,
|
|
222
|
+
items: zod_1.default.array(exports.PropertySchema).describe("List of properties in this category"),
|
|
223
|
+
}).describe("Schema representing a property category and its listings");
|
|
224
|
+
exports.BusinessPropertyCatalogSchema = zod_1.default.array(exports.PropertyCatalogSchema).describe("Schema representing a business property catalog");
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { PreferredContactMethod, PropertyInquiryType, PropertyInquiryStatus, CalendarProvider } from "../type-definitions";
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Property inquiry schema definitions for real estate lead management.
|
|
5
|
+
* @module business-mgt/property-inquiry
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Property inquiry schema for tracking customer interest in properties.
|
|
9
|
+
*
|
|
10
|
+
* @typedef {Object} PropertyInquiry
|
|
11
|
+
* @property {string} propertyId - ID of the property being inquired about
|
|
12
|
+
* @property {string} [customerId] - ID of existing contact in system
|
|
13
|
+
* @property {Object} customer - Contact details of the inquirer
|
|
14
|
+
* @property {PropertyInquiryType} inquiryType - Type of inquiry
|
|
15
|
+
* @property {string} [message] - Inquiry message from the contact
|
|
16
|
+
* @property {string} source - Source of the inquiry
|
|
17
|
+
* @property {PropertyInquiryStatus} status - Current status of the inquiry
|
|
18
|
+
* @property {number} [preferredViewingDate] - Contact's preferred viewing date
|
|
19
|
+
* @property {string} [preferredViewingTime] - Contact's preferred viewing time
|
|
20
|
+
* @property {number} [scheduledViewingDate] - Scheduled viewing date
|
|
21
|
+
* @property {boolean} viewingCompleted - Whether the viewing has been completed
|
|
22
|
+
* @property {string} [viewingNotes] - Notes from the viewing
|
|
23
|
+
* @property {number} [followUpDate] - Next follow-up date
|
|
24
|
+
* @property {string} [followUpNotes] - Notes for follow-up
|
|
25
|
+
* @property {string} [assignedAgentId] - ID of the assigned agent
|
|
26
|
+
* @property {boolean} convertedToTransaction - Whether inquiry converted to a transaction
|
|
27
|
+
* @property {string} [transactionId] - ID of the resulting transaction
|
|
28
|
+
* @property {string} [transactionType] - Type of transaction (purchase or lease)
|
|
29
|
+
* @property {boolean} interestedInBuying - Whether contact is interested in buying
|
|
30
|
+
* @property {boolean} interestedInRenting - Whether contact is interested in renting
|
|
31
|
+
* @property {number} [budgetMin] - Minimum budget
|
|
32
|
+
* @property {number} [budgetMax] - Maximum budget
|
|
33
|
+
* @property {string} [notes] - Internal notes about the inquiry
|
|
34
|
+
*/
|
|
35
|
+
export declare const PropertyInquirySchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
propertyId: z.ZodString;
|
|
40
|
+
customerId: z.ZodString;
|
|
41
|
+
customer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
customerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
phone_number: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
47
|
+
firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
lastname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
company: z.ZodOptional<z.ZodString>;
|
|
50
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
51
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
52
|
+
preferred_language: z.ZodDefault<z.ZodString>;
|
|
53
|
+
preferred_contact_method: z.ZodDefault<z.ZodEnum<typeof PreferredContactMethod>>;
|
|
54
|
+
best_time_to_call: z.ZodOptional<z.ZodEnum<typeof import("../type-definitions").BestTimeToCall>>;
|
|
55
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
56
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
custom_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
58
|
+
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
street: z.ZodString;
|
|
61
|
+
street2: z.ZodOptional<z.ZodString>;
|
|
62
|
+
city: z.ZodString;
|
|
63
|
+
state: z.ZodString;
|
|
64
|
+
postalCode: z.ZodString;
|
|
65
|
+
country: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
isValidatedNames: z.ZodDefault<z.ZodBoolean>;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
inquiryType: z.ZodEnum<typeof PropertyInquiryType>;
|
|
70
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
source: z.ZodDefault<z.ZodString>;
|
|
72
|
+
status: z.ZodDefault<z.ZodEnum<typeof PropertyInquiryStatus>>;
|
|
73
|
+
preferredViewingDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
|
+
preferredViewingTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
scheduledViewingDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
76
|
+
viewingCompleted: z.ZodDefault<z.ZodBoolean>;
|
|
77
|
+
viewingNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
followUpDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
79
|
+
followUpNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
assignedAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
convertedToTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
82
|
+
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
transactionType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
84
|
+
purchase: "purchase";
|
|
85
|
+
lease: "lease";
|
|
86
|
+
}>>>;
|
|
87
|
+
interestedInBuying: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
interestedInRenting: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
+
budgetMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
90
|
+
budgetMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
91
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
assignedUserAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
calendarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
calendarEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
calendarProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof CalendarProvider>>>;
|
|
96
|
+
cancelReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
serviceConversationConfigId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
/**
|
|
100
|
+
* Schema for creating a new property inquiry.
|
|
101
|
+
* Omits auto-generated fields.
|
|
102
|
+
*/
|
|
103
|
+
export declare const CreatePropertyInquirySchema: z.ZodObject<{
|
|
104
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
status: z.ZodDefault<z.ZodEnum<typeof PropertyInquiryStatus>>;
|
|
106
|
+
customerId: z.ZodString;
|
|
107
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
|
+
source: z.ZodDefault<z.ZodString>;
|
|
109
|
+
cancelReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
serviceConversationConfigId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
propertyId: z.ZodString;
|
|
112
|
+
inquiryType: z.ZodEnum<typeof PropertyInquiryType>;
|
|
113
|
+
preferredViewingDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
114
|
+
preferredViewingTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
scheduledViewingDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
116
|
+
viewingCompleted: z.ZodDefault<z.ZodBoolean>;
|
|
117
|
+
viewingNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
followUpDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
119
|
+
followUpNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
assignedAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
convertedToTransaction: z.ZodDefault<z.ZodBoolean>;
|
|
122
|
+
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
transactionType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
124
|
+
purchase: "purchase";
|
|
125
|
+
lease: "lease";
|
|
126
|
+
}>>>;
|
|
127
|
+
interestedInBuying: z.ZodDefault<z.ZodBoolean>;
|
|
128
|
+
interestedInRenting: z.ZodDefault<z.ZodBoolean>;
|
|
129
|
+
budgetMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
130
|
+
budgetMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
131
|
+
assignedUserAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
calendarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
calendarEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
calendarProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof CalendarProvider>>>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
/**
|
|
137
|
+
* Schema for updating an existing property inquiry.
|
|
138
|
+
* All fields are optional except id.
|
|
139
|
+
*/
|
|
140
|
+
export declare const UpdatePropertyInquirySchema: z.ZodObject<{
|
|
141
|
+
message: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
142
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<typeof PropertyInquiryStatus>>>;
|
|
143
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
145
|
+
source: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
146
|
+
cancelReason: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
147
|
+
serviceConversationConfigId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
148
|
+
propertyId: z.ZodOptional<z.ZodString>;
|
|
149
|
+
inquiryType: z.ZodOptional<z.ZodEnum<typeof PropertyInquiryType>>;
|
|
150
|
+
preferredViewingDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
151
|
+
preferredViewingTime: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
152
|
+
scheduledViewingDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
153
|
+
viewingCompleted: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
154
|
+
viewingNotes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
155
|
+
followUpDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
156
|
+
followUpNotes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
157
|
+
assignedAgentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
158
|
+
convertedToTransaction: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
159
|
+
transactionId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
160
|
+
transactionType: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
161
|
+
purchase: "purchase";
|
|
162
|
+
lease: "lease";
|
|
163
|
+
}>>>>;
|
|
164
|
+
interestedInBuying: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
165
|
+
interestedInRenting: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
166
|
+
budgetMin: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
167
|
+
budgetMax: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
168
|
+
assignedUserAccountId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
169
|
+
calendarId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
170
|
+
calendarEventId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
171
|
+
calendarProvider: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof CalendarProvider>>>>;
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
/**
|
|
175
|
+
* Quick status update schema for property inquiries.
|
|
176
|
+
* Allows updating status and viewing/follow-up details without full update.
|
|
177
|
+
*/
|
|
178
|
+
export declare const UpdatePropertyInquiryStatusSchema: z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
status: z.ZodEnum<typeof PropertyInquiryStatus>;
|
|
181
|
+
scheduledViewingDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
182
|
+
viewingCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
+
viewingNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
+
followUpDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
|
+
followUpNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export type PropertyInquiry = z.infer<typeof PropertyInquirySchema>;
|
|
188
|
+
export type CreatePropertyInquiry = z.infer<typeof CreatePropertyInquirySchema>;
|
|
189
|
+
export type UpdatePropertyInquiry = z.infer<typeof UpdatePropertyInquirySchema>;
|
|
190
|
+
export type UpdatePropertyInquiryStatus = z.infer<typeof UpdatePropertyInquiryStatusSchema>;
|
|
191
|
+
export interface PropertyInquiryFilters {
|
|
192
|
+
search?: string;
|
|
193
|
+
propertyId?: string;
|
|
194
|
+
customerId?: string;
|
|
195
|
+
status?: PropertyInquiryStatus[];
|
|
196
|
+
inquiryType?: PropertyInquiryType;
|
|
197
|
+
assignedAgentId?: string;
|
|
198
|
+
source?: string;
|
|
199
|
+
convertedToTransaction?: boolean;
|
|
200
|
+
interestedInBuying?: boolean;
|
|
201
|
+
interestedInRenting?: boolean;
|
|
202
|
+
viewingCompleted?: boolean;
|
|
203
|
+
dateRange?: {
|
|
204
|
+
start?: number;
|
|
205
|
+
end?: number;
|
|
206
|
+
};
|
|
207
|
+
followUpDateRange?: {
|
|
208
|
+
start?: number;
|
|
209
|
+
end?: number;
|
|
210
|
+
};
|
|
211
|
+
includeDeleted?: boolean;
|
|
212
|
+
}
|
|
213
|
+
export interface PropertyInquirySorting {
|
|
214
|
+
field: 'createdAt' | 'scheduledViewingDate' | 'followUpDate' | 'status';
|
|
215
|
+
direction: 'asc' | 'desc';
|
|
216
|
+
}
|
|
217
|
+
export interface PropertyInquiryQueryOptions {
|
|
218
|
+
page: number;
|
|
219
|
+
pageSize: number;
|
|
220
|
+
filters?: PropertyInquiryFilters;
|
|
221
|
+
sorting?: PropertyInquirySorting;
|
|
222
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdatePropertyInquiryStatusSchema = exports.UpdatePropertyInquirySchema = exports.CreatePropertyInquirySchema = exports.PropertyInquirySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const base_schema_1 = require("../base.schema");
|
|
9
|
+
const type_definitions_1 = require("../type-definitions");
|
|
10
|
+
const customer_schema_1 = require("./customer.schema");
|
|
11
|
+
/**
|
|
12
|
+
* @fileoverview Property inquiry schema definitions for real estate lead management.
|
|
13
|
+
* @module business-mgt/property-inquiry
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Property inquiry schema for tracking customer interest in properties.
|
|
17
|
+
*
|
|
18
|
+
* @typedef {Object} PropertyInquiry
|
|
19
|
+
* @property {string} propertyId - ID of the property being inquired about
|
|
20
|
+
* @property {string} [customerId] - ID of existing contact in system
|
|
21
|
+
* @property {Object} customer - Contact details of the inquirer
|
|
22
|
+
* @property {PropertyInquiryType} inquiryType - Type of inquiry
|
|
23
|
+
* @property {string} [message] - Inquiry message from the contact
|
|
24
|
+
* @property {string} source - Source of the inquiry
|
|
25
|
+
* @property {PropertyInquiryStatus} status - Current status of the inquiry
|
|
26
|
+
* @property {number} [preferredViewingDate] - Contact's preferred viewing date
|
|
27
|
+
* @property {string} [preferredViewingTime] - Contact's preferred viewing time
|
|
28
|
+
* @property {number} [scheduledViewingDate] - Scheduled viewing date
|
|
29
|
+
* @property {boolean} viewingCompleted - Whether the viewing has been completed
|
|
30
|
+
* @property {string} [viewingNotes] - Notes from the viewing
|
|
31
|
+
* @property {number} [followUpDate] - Next follow-up date
|
|
32
|
+
* @property {string} [followUpNotes] - Notes for follow-up
|
|
33
|
+
* @property {string} [assignedAgentId] - ID of the assigned agent
|
|
34
|
+
* @property {boolean} convertedToTransaction - Whether inquiry converted to a transaction
|
|
35
|
+
* @property {string} [transactionId] - ID of the resulting transaction
|
|
36
|
+
* @property {string} [transactionType] - Type of transaction (purchase or lease)
|
|
37
|
+
* @property {boolean} interestedInBuying - Whether contact is interested in buying
|
|
38
|
+
* @property {boolean} interestedInRenting - Whether contact is interested in renting
|
|
39
|
+
* @property {number} [budgetMin] - Minimum budget
|
|
40
|
+
* @property {number} [budgetMax] - Maximum budget
|
|
41
|
+
* @property {string} [notes] - Internal notes about the inquiry
|
|
42
|
+
*/
|
|
43
|
+
exports.PropertyInquirySchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
44
|
+
propertyId: zod_1.default.string().describe("ID of the property being inquired about"),
|
|
45
|
+
// Contact Information
|
|
46
|
+
customerId: zod_1.default.string().describe("ID of existing contact in system"),
|
|
47
|
+
customer: customer_schema_1.CustomerSchema.nullable().optional().describe("Contact details of the inquirer"),
|
|
48
|
+
// Inquiry Details
|
|
49
|
+
inquiryType: zod_1.default.enum(type_definitions_1.PropertyInquiryType).describe("Type of inquiry"),
|
|
50
|
+
message: zod_1.default.string().nullable().optional().describe("Inquiry message from the contact"),
|
|
51
|
+
source: zod_1.default.string().default('direct').describe("Source of the inquiry (website, referral, agent, etc.)"),
|
|
52
|
+
// Status
|
|
53
|
+
status: zod_1.default.enum(type_definitions_1.PropertyInquiryStatus).default(type_definitions_1.PropertyInquiryStatus.NEW).describe("Current status of the inquiry"),
|
|
54
|
+
// Scheduling
|
|
55
|
+
preferredViewingDate: zod_1.default.number().nullable().optional().describe("Contact's preferred viewing date (timestamp)"),
|
|
56
|
+
preferredViewingTime: zod_1.default.string().nullable().optional().describe("Contact's preferred viewing time"),
|
|
57
|
+
scheduledViewingDate: zod_1.default.number().nullable().optional().describe("Scheduled viewing date (timestamp)"),
|
|
58
|
+
viewingCompleted: zod_1.default.boolean().default(false).describe("Whether the viewing has been completed"),
|
|
59
|
+
viewingNotes: zod_1.default.string().nullable().optional().describe("Notes from the viewing"),
|
|
60
|
+
// Follow-up
|
|
61
|
+
followUpDate: zod_1.default.number().nullable().optional().describe("Next follow-up date (timestamp)"),
|
|
62
|
+
followUpNotes: zod_1.default.string().nullable().optional().describe("Notes for follow-up"),
|
|
63
|
+
assignedAgentId: zod_1.default.string().nullable().optional().describe("ID of the assigned agent"),
|
|
64
|
+
// Conversion Tracking
|
|
65
|
+
convertedToTransaction: zod_1.default.boolean().default(false).describe("Whether inquiry converted to a transaction"),
|
|
66
|
+
transactionId: zod_1.default.string().nullable().optional().describe("ID of the resulting transaction"),
|
|
67
|
+
transactionType: zod_1.default.enum(['purchase', 'lease']).nullable().optional().describe("Type of transaction (purchase or lease)"),
|
|
68
|
+
// Interest Details
|
|
69
|
+
interestedInBuying: zod_1.default.boolean().default(false).describe("Whether contact is interested in buying"),
|
|
70
|
+
interestedInRenting: zod_1.default.boolean().default(false).describe("Whether contact is interested in renting"),
|
|
71
|
+
budgetMin: zod_1.default.number().nonnegative().nullable().optional().describe("Minimum budget"),
|
|
72
|
+
budgetMax: zod_1.default.number().nonnegative().nullable().optional().describe("Maximum budget"),
|
|
73
|
+
// Notes
|
|
74
|
+
notes: zod_1.default.string().nullable().optional().describe("Internal notes about the inquiry"),
|
|
75
|
+
// Calendar Integration
|
|
76
|
+
assignedUserAccountId: zod_1.default.string().nullable().optional().describe("User account managing the appointment"),
|
|
77
|
+
calendarId: zod_1.default.string().nullable().optional().describe("Calendar ID where appointment is stored"),
|
|
78
|
+
calendarEventId: zod_1.default.string().nullable().optional().describe("External calendar event ID"),
|
|
79
|
+
calendarProvider: zod_1.default.enum(type_definitions_1.CalendarProvider).nullable().optional().describe("Calendar provider type"),
|
|
80
|
+
cancelReason: zod_1.default.string().nullable().optional().describe("Reason for cancellation, if applicable"),
|
|
81
|
+
serviceConversationConfigId: zod_1.default.string().nullable().optional().describe("Configuration ID for service conversation"),
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Schema for creating a new property inquiry.
|
|
85
|
+
* Omits auto-generated fields.
|
|
86
|
+
*/
|
|
87
|
+
exports.CreatePropertyInquirySchema = exports.PropertyInquirySchema.omit({
|
|
88
|
+
id: true,
|
|
89
|
+
createdAt: true,
|
|
90
|
+
updatedAt: true,
|
|
91
|
+
customer: true,
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Schema for updating an existing property inquiry.
|
|
95
|
+
* All fields are optional except id.
|
|
96
|
+
*/
|
|
97
|
+
exports.UpdatePropertyInquirySchema = exports.CreatePropertyInquirySchema.partial().safeExtend({
|
|
98
|
+
id: zod_1.default.string(),
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Quick status update schema for property inquiries.
|
|
102
|
+
* Allows updating status and viewing/follow-up details without full update.
|
|
103
|
+
*/
|
|
104
|
+
exports.UpdatePropertyInquiryStatusSchema = zod_1.default.object({
|
|
105
|
+
id: zod_1.default.string().describe("Inquiry ID"),
|
|
106
|
+
status: zod_1.default.enum(type_definitions_1.PropertyInquiryStatus).describe("New status"),
|
|
107
|
+
scheduledViewingDate: zod_1.default.number().nullable().optional().describe("Scheduled viewing date"),
|
|
108
|
+
viewingCompleted: zod_1.default.boolean().optional().describe("Whether viewing is completed"),
|
|
109
|
+
viewingNotes: zod_1.default.string().nullable().optional().describe("Viewing notes"),
|
|
110
|
+
followUpDate: zod_1.default.number().nullable().optional().describe("Follow-up date"),
|
|
111
|
+
followUpNotes: zod_1.default.string().nullable().optional().describe("Follow-up notes"),
|
|
112
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Central export point for property management schemas.
|
|
4
|
+
* @module business-mgt/property-management
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./property-config.schema"), exports);
|
|
22
|
+
__exportStar(require("./property-inquiry.schema"), exports);
|