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.
Files changed (261) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -0
  3. package/dist/core/account/index.d.ts +7 -0
  4. package/dist/core/account/index.js +23 -0
  5. package/dist/core/account/organization.schema.d.ts +118 -0
  6. package/dist/core/account/organization.schema.js +91 -0
  7. package/dist/core/account/project.schema.d.ts +121 -0
  8. package/dist/core/account/project.schema.js +102 -0
  9. package/dist/core/account/supported-business-verticals.d.ts +8 -0
  10. package/dist/core/account/supported-business-verticals.js +23 -0
  11. package/dist/core/assistant-setups/assistant-setup-result.schema.d.ts +115 -0
  12. package/dist/core/assistant-setups/assistant-setup-result.schema.js +17 -0
  13. package/dist/core/assistant-setups/base-assistant-setup.schema.d.ts +61 -0
  14. package/dist/core/assistant-setups/base-assistant-setup.schema.js +29 -0
  15. package/dist/core/assistant-setups/index.d.ts +4 -0
  16. package/dist/core/assistant-setups/index.js +21 -0
  17. package/dist/core/assistant-setups/phone-assistant-setup.schema.d.ts +63 -0
  18. package/dist/core/assistant-setups/phone-assistant-setup.schema.js +14 -0
  19. package/dist/core/assistant-setups/web-assitant-setup.schema.d.ts +56 -0
  20. package/dist/core/assistant-setups/web-assitant-setup.schema.js +17 -0
  21. package/dist/core/base.schema.d.ts +34 -0
  22. package/dist/core/base.schema.js +36 -0
  23. package/dist/core/business-mgt/appointment-additional-info.schema.d.ts +63 -0
  24. package/dist/core/business-mgt/appointment-additional-info.schema.js +53 -0
  25. package/dist/core/business-mgt/appointment-field-config.schema.d.ts +251 -0
  26. package/dist/core/business-mgt/appointment-field-config.schema.js +49 -0
  27. package/dist/core/business-mgt/bookings.shared.schema.d.ts +47 -0
  28. package/dist/core/business-mgt/bookings.shared.schema.js +60 -0
  29. package/dist/core/business-mgt/business-location.schema.d.ts +327 -0
  30. package/dist/core/business-mgt/business-location.schema.js +176 -0
  31. package/dist/core/business-mgt/customer-management/customer-group.schema.d.ts +87 -0
  32. package/dist/core/business-mgt/customer-management/customer-group.schema.js +53 -0
  33. package/dist/core/business-mgt/customer-management/customer.schema.d.ts +156 -0
  34. package/dist/core/business-mgt/customer-management/customer.schema.js +93 -0
  35. package/dist/core/business-mgt/customer-management/index.d.ts +7 -0
  36. package/dist/core/business-mgt/customer-management/index.js +23 -0
  37. package/dist/core/business-mgt/customer-management/shipping-address.schema.d.ts +112 -0
  38. package/dist/core/business-mgt/customer-management/shipping-address.schema.js +79 -0
  39. package/dist/core/business-mgt/customer.schema.d.ts +111 -0
  40. package/dist/core/business-mgt/customer.schema.js +73 -0
  41. package/dist/core/business-mgt/discount-rule.schema.d.ts +183 -0
  42. package/dist/core/business-mgt/discount-rule.schema.js +108 -0
  43. package/dist/core/business-mgt/index.d.ts +16 -0
  44. package/dist/core/business-mgt/index.js +38 -0
  45. package/dist/core/business-mgt/menu-config.schema.d.ts +165 -0
  46. package/dist/core/business-mgt/menu-config.schema.js +86 -0
  47. package/dist/core/business-mgt/menu-management/index.d.ts +11 -0
  48. package/dist/core/business-mgt/menu-management/index.js +27 -0
  49. package/dist/core/business-mgt/menu-management/menu-catalog.schema.d.ts +386 -0
  50. package/dist/core/business-mgt/menu-management/menu-catalog.schema.js +58 -0
  51. package/dist/core/business-mgt/menu-management/menu-config.schema.d.ts +301 -0
  52. package/dist/core/business-mgt/menu-management/menu-config.schema.js +169 -0
  53. package/dist/core/business-mgt/menu-management/menu-item-variant.schema.d.ts +143 -0
  54. package/dist/core/business-mgt/menu-management/menu-item-variant.schema.js +86 -0
  55. package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.d.ts +239 -0
  56. package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.js +117 -0
  57. package/dist/core/business-mgt/menu-management/menu-set.schema.d.ts +420 -0
  58. package/dist/core/business-mgt/menu-management/menu-set.schema.js +283 -0
  59. package/dist/core/business-mgt/menu-management/menu.order.schema.d.ts +654 -0
  60. package/dist/core/business-mgt/menu-management/menu.order.schema.js +204 -0
  61. package/dist/core/business-mgt/menu-management/modifier.schema.d.ts +585 -0
  62. package/dist/core/business-mgt/menu-management/modifier.schema.js +341 -0
  63. package/dist/core/business-mgt/menu.order.schema.d.ts +335 -0
  64. package/dist/core/business-mgt/menu.order.schema.js +149 -0
  65. package/dist/core/business-mgt/order.schema.d.ts +222 -0
  66. package/dist/core/business-mgt/order.schema.js +205 -0
  67. package/dist/core/business-mgt/pricing-rule.shared.schema.d.ts +56 -0
  68. package/dist/core/business-mgt/pricing-rule.shared.schema.js +68 -0
  69. package/dist/core/business-mgt/product-config.schema.d.ts +177 -0
  70. package/dist/core/business-mgt/product-config.schema.js +106 -0
  71. package/dist/core/business-mgt/product-management/index.d.ts +12 -0
  72. package/dist/core/business-mgt/product-management/index.js +28 -0
  73. package/dist/core/business-mgt/product-management/product-axis-binding.schema.d.ts +54 -0
  74. package/dist/core/business-mgt/product-management/product-axis-binding.schema.js +54 -0
  75. package/dist/core/business-mgt/product-management/product-config.schema.d.ts +1042 -0
  76. package/dist/core/business-mgt/product-management/product-config.schema.js +392 -0
  77. package/dist/core/business-mgt/product-management/product-display.schema.d.ts +548 -0
  78. package/dist/core/business-mgt/product-management/product-display.schema.js +80 -0
  79. package/dist/core/business-mgt/product-management/product-order.schema.d.ts +493 -0
  80. package/dist/core/business-mgt/product-management/product-order.schema.js +158 -0
  81. package/dist/core/business-mgt/product-management/product-pricing-rule.schema.d.ts +167 -0
  82. package/dist/core/business-mgt/product-management/product-pricing-rule.schema.js +68 -0
  83. package/dist/core/business-mgt/product-management/product-set.schema.d.ts +488 -0
  84. package/dist/core/business-mgt/product-management/product-set.schema.js +273 -0
  85. package/dist/core/business-mgt/product-management/product-variant-axis.schema.d.ts +156 -0
  86. package/dist/core/business-mgt/product-management/product-variant-axis.schema.js +98 -0
  87. package/dist/core/business-mgt/product-management/product-variant.schema.d.ts +219 -0
  88. package/dist/core/business-mgt/product-management/product-variant.schema.js +130 -0
  89. package/dist/core/business-mgt/product-order.schema.d.ts +326 -0
  90. package/dist/core/business-mgt/product-order.schema.js +153 -0
  91. package/dist/core/business-mgt/property-config.schema.d.ts +621 -0
  92. package/dist/core/business-mgt/property-config.schema.js +224 -0
  93. package/dist/core/business-mgt/property-inquiry.schema.d.ts +222 -0
  94. package/dist/core/business-mgt/property-inquiry.schema.js +112 -0
  95. package/dist/core/business-mgt/property-management/index.d.ts +6 -0
  96. package/dist/core/business-mgt/property-management/index.js +22 -0
  97. package/dist/core/business-mgt/property-management/property-config.schema.d.ts +1306 -0
  98. package/dist/core/business-mgt/property-management/property-config.schema.js +367 -0
  99. package/dist/core/business-mgt/property-management/property-inquiry.schema.d.ts +254 -0
  100. package/dist/core/business-mgt/property-management/property-inquiry.schema.js +131 -0
  101. package/dist/core/business-mgt/reservation-mgt/assignment/index.d.ts +3 -0
  102. package/dist/core/business-mgt/reservation-mgt/assignment/index.js +19 -0
  103. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.d.ts +139 -0
  104. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.js +90 -0
  105. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.d.ts +104 -0
  106. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.js +70 -0
  107. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.d.ts +104 -0
  108. package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.js +72 -0
  109. package/dist/core/business-mgt/reservation-mgt/index.d.ts +14 -0
  110. package/dist/core/business-mgt/reservation-mgt/index.js +31 -0
  111. package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.d.ts +180 -0
  112. package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.js +75 -0
  113. package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.d.ts +91 -0
  114. package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.js +57 -0
  115. package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.d.ts +334 -0
  116. package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.js +179 -0
  117. package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.d.ts +195 -0
  118. package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.js +106 -0
  119. package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.d.ts +402 -0
  120. package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.js +198 -0
  121. package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.d.ts +229 -0
  122. package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.js +127 -0
  123. package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.d.ts +382 -0
  124. package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.js +322 -0
  125. package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.d.ts +123 -0
  126. package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.js +83 -0
  127. package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.d.ts +167 -0
  128. package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.js +84 -0
  129. package/dist/core/business-mgt/reservation-mgt/reservation.schema.d.ts +0 -0
  130. package/dist/core/business-mgt/reservation-mgt/reservation.schema.js +153 -0
  131. package/dist/core/business-mgt/reservation-mgt/resource/index.d.ts +4 -0
  132. package/dist/core/business-mgt/reservation-mgt/resource/index.js +20 -0
  133. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.d.ts +157 -0
  134. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.js +76 -0
  135. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.d.ts +137 -0
  136. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.js +94 -0
  137. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.d.ts +713 -0
  138. package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.js +363 -0
  139. package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.d.ts +151 -0
  140. package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.js +147 -0
  141. package/dist/core/business-mgt/reservation-resource.schema.d.ts +154 -0
  142. package/dist/core/business-mgt/reservation-resource.schema.js +100 -0
  143. package/dist/core/business-mgt/reservation.schema.d.ts +119 -0
  144. package/dist/core/business-mgt/reservation.schema.js +89 -0
  145. package/dist/core/business-mgt/service-appointment.schema.d.ts +105 -0
  146. package/dist/core/business-mgt/service-appointment.schema.js +69 -0
  147. package/dist/core/business-mgt/service-config.schema.d.ts +453 -0
  148. package/dist/core/business-mgt/service-config.schema.js +102 -0
  149. package/dist/core/business-mgt/service-management/appointment-additional-info.schema.d.ts +110 -0
  150. package/dist/core/business-mgt/service-management/appointment-additional-info.schema.js +78 -0
  151. package/dist/core/business-mgt/service-management/appointment-field-config.schema.d.ts +304 -0
  152. package/dist/core/business-mgt/service-management/appointment-field-config.schema.js +75 -0
  153. package/dist/core/business-mgt/service-management/business-service-config.schema.d.ts +1226 -0
  154. package/dist/core/business-mgt/service-management/business-service-config.schema.js +317 -0
  155. package/dist/core/business-mgt/service-management/index.d.ts +13 -0
  156. package/dist/core/business-mgt/service-management/index.js +29 -0
  157. package/dist/core/business-mgt/service-management/service-appointment.schema.d.ts +531 -0
  158. package/dist/core/business-mgt/service-management/service-appointment.schema.js +116 -0
  159. package/dist/core/business-mgt/service-management/service-person.schema.d.ts +122 -0
  160. package/dist/core/business-mgt/service-management/service-person.schema.js +66 -0
  161. package/dist/core/business-mgt/service-management/service-pricing-rule.schema.d.ts +221 -0
  162. package/dist/core/business-mgt/service-management/service-pricing-rule.schema.js +118 -0
  163. package/dist/core/business-mgt/service-management/service-provider.schema.d.ts +90 -0
  164. package/dist/core/business-mgt/service-management/service-provider.schema.js +54 -0
  165. package/dist/core/business-mgt/service-management/service-slot-query.schema.d.ts +90 -0
  166. package/dist/core/business-mgt/service-management/service-slot-query.schema.js +113 -0
  167. package/dist/core/business-mgt/service-management/service-time-off.schema.d.ts +121 -0
  168. package/dist/core/business-mgt/service-management/service-time-off.schema.js +95 -0
  169. package/dist/core/business-mgt/service-person.schema.d.ts +43 -0
  170. package/dist/core/business-mgt/service-person.schema.js +38 -0
  171. package/dist/core/business-mgt/tax-rule.schema.d.ts +161 -0
  172. package/dist/core/business-mgt/tax-rule.schema.js +90 -0
  173. package/dist/core/conversation/conversation-config.schema.d.ts +644 -0
  174. package/dist/core/conversation/conversation-config.schema.js +351 -0
  175. package/dist/core/conversation/conversation-message.schema.d.ts +307 -0
  176. package/dist/core/conversation/conversation-message.schema.js +275 -0
  177. package/dist/core/conversation/index.d.ts +12 -0
  178. package/dist/core/conversation/index.js +28 -0
  179. package/dist/core/conversation/outbound-call.schema.d.ts +209 -0
  180. package/dist/core/conversation/outbound-call.schema.js +116 -0
  181. package/dist/core/conversation/outbound-email.schema.d.ts +338 -0
  182. package/dist/core/conversation/outbound-email.schema.js +150 -0
  183. package/dist/core/conversation/outbound-sms.schema.d.ts +163 -0
  184. package/dist/core/conversation/outbound-sms.schema.js +85 -0
  185. package/dist/core/conversation/outbound-template.schema.d.ts +375 -0
  186. package/dist/core/conversation/outbound-template.schema.js +160 -0
  187. package/dist/core/conversation/translation-config.schema.d.ts +92 -0
  188. package/dist/core/conversation/translation-config.schema.js +88 -0
  189. package/dist/core/conversation/translation-conversation.schema.d.ts +469 -0
  190. package/dist/core/conversation/translation-conversation.schema.js +175 -0
  191. package/dist/core/index.d.ts +12 -0
  192. package/dist/core/index.js +30 -0
  193. package/dist/core/service-configuration/agent-config.schema.d.ts +236 -0
  194. package/dist/core/service-configuration/agent-config.schema.js +152 -0
  195. package/dist/core/service-configuration/base-agent-setup.d.ts +147 -0
  196. package/dist/core/service-configuration/base-agent-setup.js +123 -0
  197. package/dist/core/service-configuration/call-transfer-config.schema.d.ts +60 -0
  198. package/dist/core/service-configuration/call-transfer-config.schema.js +53 -0
  199. package/dist/core/service-configuration/deployment-config.schema.d.ts +522 -0
  200. package/dist/core/service-configuration/deployment-config.schema.js +271 -0
  201. package/dist/core/service-configuration/dynamic_setup/base-agent-setup.d.ts +130 -0
  202. package/dist/core/service-configuration/dynamic_setup/base-agent-setup.js +110 -0
  203. package/dist/core/service-configuration/dynamic_setup/index.d.ts +10 -0
  204. package/dist/core/service-configuration/dynamic_setup/index.js +26 -0
  205. package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.d.ts +111 -0
  206. package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.js +56 -0
  207. package/dist/core/service-configuration/dynamic_setup/web-agent-setup.d.ts +113 -0
  208. package/dist/core/service-configuration/dynamic_setup/web-agent-setup.js +55 -0
  209. package/dist/core/service-configuration/index.d.ts +17 -0
  210. package/dist/core/service-configuration/index.js +33 -0
  211. package/dist/core/service-configuration/instruction-config.schema.d.ts +183 -0
  212. package/dist/core/service-configuration/instruction-config.schema.js +139 -0
  213. package/dist/core/service-configuration/interaction-channels.schema.d.ts +469 -0
  214. package/dist/core/service-configuration/interaction-channels.schema.js +390 -0
  215. package/dist/core/service-configuration/knowledge.schema.d.ts +107 -0
  216. package/dist/core/service-configuration/knowledge.schema.js +106 -0
  217. package/dist/core/service-configuration/phone-config.schema.d.ts +206 -0
  218. package/dist/core/service-configuration/phone-config.schema.js +121 -0
  219. package/dist/core/service-configuration/phone-number.schema.d.ts +236 -0
  220. package/dist/core/service-configuration/phone-number.schema.js +211 -0
  221. package/dist/core/service-configuration/provisioning-config.d.ts +429 -0
  222. package/dist/core/service-configuration/provisioning-config.js +307 -0
  223. package/dist/core/service-configuration/support-llm.d.ts +95 -0
  224. package/dist/core/service-configuration/support-llm.js +76 -0
  225. package/dist/core/service-configuration/voice-language.schema.d.ts +200 -0
  226. package/dist/core/service-configuration/voice-language.schema.js +166 -0
  227. package/dist/core/type-definitions/account-definitions.d.ts +82 -0
  228. package/dist/core/type-definitions/account-definitions.js +88 -0
  229. package/dist/core/type-definitions/business-definitions.d.ts +394 -0
  230. package/dist/core/type-definitions/business-definitions.js +447 -0
  231. package/dist/core/type-definitions/conversation.type.definition.d.ts +223 -0
  232. package/dist/core/type-definitions/conversation.type.definition.js +236 -0
  233. package/dist/core/type-definitions/display-order.d.ts +154 -0
  234. package/dist/core/type-definitions/display-order.js +154 -0
  235. package/dist/core/type-definitions/dynamic-fields/field-definition.schema.d.ts +165 -0
  236. package/dist/core/type-definitions/dynamic-fields/field-definition.schema.js +97 -0
  237. package/dist/core/type-definitions/dynamic-fields/field-types.d.ts +49 -0
  238. package/dist/core/type-definitions/dynamic-fields/field-types.js +104 -0
  239. package/dist/core/type-definitions/dynamic-fields/index.d.ts +9 -0
  240. package/dist/core/type-definitions/dynamic-fields/index.js +25 -0
  241. package/dist/core/type-definitions/index.d.ts +10 -0
  242. package/dist/core/type-definitions/index.js +26 -0
  243. package/dist/core/type-definitions/knowledge-definitions.d.ts +30 -0
  244. package/dist/core/type-definitions/knowledge-definitions.js +37 -0
  245. package/dist/core/type-definitions/service-config.definitions.d.ts +112 -0
  246. package/dist/core/type-definitions/service-config.definitions.js +135 -0
  247. package/dist/core/validators/channel-validation.d.ts +19 -0
  248. package/dist/core/validators/channel-validation.js +40 -0
  249. package/dist/core/validators/index.d.ts +5 -0
  250. package/dist/core/validators/index.js +21 -0
  251. package/dist/index.d.ts +6 -0
  252. package/dist/index.js +24 -0
  253. package/dist/request/index.d.ts +5 -0
  254. package/dist/request/index.js +21 -0
  255. package/dist/request/models/index.d.ts +6 -0
  256. package/dist/request/models/index.js +22 -0
  257. package/dist/request/models/paginated-quest.schema.d.ts +33 -0
  258. package/dist/request/models/paginated-quest.schema.js +35 -0
  259. package/dist/request/models/paginated-result.schema.d.ts +124 -0
  260. package/dist/request/models/paginated-result.schema.js +94 -0
  261. package/package.json +43 -0
@@ -0,0 +1,131 @@
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-management/customer.schema");
11
+ /**
12
+ * @fileoverview Property Inquiry schema definitions for property management.
13
+ * @module business-mgt/property-inquiry
14
+ *
15
+ * Property inquiries track leads and customer interest in properties,
16
+ * including viewing scheduling, follow-ups, and conversion tracking.
17
+ */
18
+ // ============================================================================
19
+ // PROPERTY INQUIRY SCHEMA
20
+ // ============================================================================
21
+ /**
22
+ * Property Inquiry schema.
23
+ * Tracks customer inquiries about properties with viewing and follow-up management.
24
+ *
25
+ * @typedef {Object} PropertyInquiry
26
+ * @property {string} propertyId - ID of the property being inquired about
27
+ * @property {string} [customerId] - ID of existing contact in system
28
+ * @property {Object} [customer] - Contact details of the inquirer
29
+ * @property {PropertyInquiryType} inquiryType - Type of inquiry
30
+ * @property {string} [message] - Inquiry message from the contact
31
+ * @property {string} source - Source of the inquiry
32
+ * @property {PropertyInquiryStatus} status - Current status of the inquiry
33
+ * @property {number} [preferredViewingDate] - Contact's preferred viewing date
34
+ * @property {string} [preferredViewingTime] - Contact's preferred viewing time
35
+ * @property {number} [scheduledViewingDate] - Scheduled viewing date
36
+ * @property {boolean} viewingCompleted - Whether the viewing has been completed
37
+ * @property {string} [viewingNotes] - Notes from the viewing
38
+ * @property {number} [followUpDate] - Next follow-up date
39
+ * @property {string} [followUpNotes] - Notes for follow-up
40
+ * @property {string} [assignedAgentId] - ID of the assigned agent
41
+ * @property {boolean} convertedToTransaction - Whether inquiry converted to a transaction
42
+ * @property {string} [transactionId] - ID of the resulting transaction
43
+ * @property {string} [transactionType] - Type of transaction (purchase or lease)
44
+ * @property {boolean} interestedInBuying - Whether contact is interested in buying
45
+ * @property {boolean} interestedInRenting - Whether contact is interested in renting
46
+ * @property {number} [budgetMin] - Minimum budget
47
+ * @property {number} [budgetMax] - Maximum budget
48
+ * @property {string} [notes] - Internal notes about the inquiry
49
+ * @property {string} [appointmentRecordId] - Linked appointment record ID
50
+ * @property {string} [cancelReason] - Reason for cancellation
51
+ * @property {string} [serviceConversationConfigId] - Service conversation config ID
52
+ */
53
+ exports.PropertyInquirySchema = base_schema_1.BaseModelSchema.safeExtend({
54
+ propertyId: zod_1.default.string().describe("ID of the property being inquired about"),
55
+ // Contact Information
56
+ customerId: zod_1.default.string().nullable().optional().describe("ID of existing contact in system"),
57
+ customer: customer_schema_1.CustomerSchema.nullable().optional().describe("Contact details of the inquirer"),
58
+ // Inquiry Details
59
+ inquiryType: zod_1.default.enum(type_definitions_1.PropertyInquiryType).describe("Type of inquiry"),
60
+ message: zod_1.default.string().nullable().optional().describe("Inquiry message from the contact"),
61
+ source: zod_1.default.string().default('direct').describe("Source of the inquiry (website, referral, agent, etc.)"),
62
+ // Status
63
+ status: zod_1.default.enum(type_definitions_1.PropertyInquiryStatus).default(type_definitions_1.PropertyInquiryStatus.NEW).describe("Current status of the inquiry"),
64
+ // Scheduling
65
+ preferredViewingDate: zod_1.default.number().nullable().optional().describe("Contact's preferred viewing date (timestamp)"),
66
+ preferredViewingTime: zod_1.default.string().nullable().optional().describe("Contact's preferred viewing time"),
67
+ scheduledViewingDate: zod_1.default.number().nullable().optional().describe("Scheduled viewing date (timestamp)"),
68
+ viewingCompleted: zod_1.default.boolean().default(false).describe("Whether the viewing has been completed"),
69
+ viewingNotes: zod_1.default.string().nullable().optional().describe("Notes from the viewing"),
70
+ // Follow-up
71
+ followUpDate: zod_1.default.number().nullable().optional().describe("Next follow-up date (timestamp)"),
72
+ followUpNotes: zod_1.default.string().nullable().optional().describe("Notes for follow-up"),
73
+ assignedAgentId: zod_1.default.string().nullable().optional().describe("ID of the assigned agent"),
74
+ // Conversion Tracking
75
+ convertedToTransaction: zod_1.default.boolean().default(false).describe("Whether inquiry converted to a transaction"),
76
+ transactionId: zod_1.default.string().nullable().optional().describe("ID of the resulting transaction"),
77
+ transactionType: zod_1.default.enum(['purchase', 'lease']).nullable().optional().describe("Type of transaction (purchase or lease)"),
78
+ // Interest Details
79
+ interestedInBuying: zod_1.default.boolean().default(false).describe("Whether contact is interested in buying"),
80
+ interestedInRenting: zod_1.default.boolean().default(false).describe("Whether contact is interested in renting"),
81
+ budgetMin: zod_1.default.number().nonnegative().nullable().optional().describe("Minimum budget"),
82
+ budgetMax: zod_1.default.number().nonnegative().nullable().optional().describe("Maximum budget"),
83
+ // Notes
84
+ notes: zod_1.default.string().nullable().optional().describe("Internal notes about the inquiry"),
85
+ // Calendar Integration
86
+ appointmentRecordId: zod_1.default.string().nullable().optional().describe("Linked appointment record ID for scheduled viewings"),
87
+ cancelReason: zod_1.default.string().nullable().optional().describe("Reason for cancellation, if applicable"),
88
+ serviceConversationConfigId: zod_1.default.string().nullable().optional().describe("Configuration ID for service conversation"),
89
+ });
90
+ // ============================================================================
91
+ // CREATE/UPDATE SCHEMAS
92
+ // ============================================================================
93
+ /**
94
+ * Schema for creating a new property inquiry.
95
+ */
96
+ exports.CreatePropertyInquirySchema = exports.PropertyInquirySchema.omit({
97
+ id: true,
98
+ createdAt: true,
99
+ updatedAt: true,
100
+ customer: true,
101
+ });
102
+ /**
103
+ * Schema for updating an existing property inquiry.
104
+ *
105
+ * @remarks
106
+ * Fields that carry a `.default()` on the base schema are re-declared here as plain
107
+ * `.optional()` (without defaults). In Zod, `.partial()` does not strip defaults, so a
108
+ * partial update would otherwise inject those defaults (e.g., `status`, `source`) on
109
+ * `.parse()` and submit values the caller never set.
110
+ */
111
+ exports.UpdatePropertyInquirySchema = exports.CreatePropertyInquirySchema.partial().safeExtend({
112
+ id: zod_1.default.string().describe("Unique identifier of the PropertyInquiry to update"),
113
+ source: zod_1.default.string().optional().describe("Source of the inquiry (website, referral, agent, etc.)"),
114
+ status: zod_1.default.enum(type_definitions_1.PropertyInquiryStatus).optional().describe("Current status of the inquiry"),
115
+ viewingCompleted: zod_1.default.boolean().optional().describe("Whether the viewing has been completed"),
116
+ convertedToTransaction: zod_1.default.boolean().optional().describe("Whether inquiry converted to a transaction"),
117
+ interestedInBuying: zod_1.default.boolean().optional().describe("Whether contact is interested in buying"),
118
+ interestedInRenting: zod_1.default.boolean().optional().describe("Whether contact is interested in renting"),
119
+ });
120
+ /**
121
+ * Schema for quick status update on property inquiry.
122
+ */
123
+ exports.UpdatePropertyInquiryStatusSchema = zod_1.default.object({
124
+ id: zod_1.default.string().describe("Inquiry ID"),
125
+ status: zod_1.default.enum(type_definitions_1.PropertyInquiryStatus).describe("New status"),
126
+ scheduledViewingDate: zod_1.default.number().nullable().optional().describe("Scheduled viewing date"),
127
+ viewingCompleted: zod_1.default.boolean().optional().describe("Whether viewing is completed"),
128
+ viewingNotes: zod_1.default.string().nullable().optional().describe("Viewing notes"),
129
+ followUpDate: zod_1.default.number().nullable().optional().describe("Follow-up date"),
130
+ followUpNotes: zod_1.default.string().nullable().optional().describe("Follow-up notes"),
131
+ });
@@ -0,0 +1,3 @@
1
+ export * from "./reservation-table-assignment.schema";
2
+ export * from "./reservation-room-assignment.schema";
3
+ export * from "./reservation-rental-assignment.schema";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./reservation-table-assignment.schema"), exports);
18
+ __exportStar(require("./reservation-room-assignment.schema"), exports);
19
+ __exportStar(require("./reservation-rental-assignment.schema"), exports);
@@ -0,0 +1,139 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * @fileoverview Rental assignment schema definitions.
4
+ * @module business-mgt/reservation-mgt/assignment/rental-assignment
5
+ */
6
+ /**
7
+ * Rental assignment lifecycle status.
8
+ *
9
+ * @enum {string}
10
+ */
11
+ export declare enum RentalAssignmentStatus {
12
+ ASSIGNED = "assigned",
13
+ REASSIGNED = "reassigned",
14
+ RELEASED = "released"
15
+ }
16
+ /**
17
+ * Rental assignment lock type.
18
+ *
19
+ * @enum {string}
20
+ */
21
+ export declare enum RentalAssignmentType {
22
+ SOFT = "soft",
23
+ HARD = "hard"
24
+ }
25
+ /**
26
+ * Rental unit condition schema.
27
+ * Captures a condition inspection snapshot at pickup or return.
28
+ *
29
+ * @typedef {Object} RentalUnitCondition
30
+ * @property {number} recordedAt - Condition recording timestamp
31
+ * @property {string} recordedBy - Staff user ID that recorded the condition
32
+ * @property {string} [notes] - Condition notes
33
+ * @property {boolean} damageReported - Whether damage was reported
34
+ * @property {string[]} [imageUrls] - Condition photo URLs
35
+ */
36
+ export declare const RentalUnitConditionSchema: z.ZodObject<{
37
+ recordedAt: z.ZodNumber;
38
+ recordedBy: z.ZodString;
39
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
+ damageReported: z.ZodDefault<z.ZodBoolean>;
41
+ imageUrls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodURL>>>;
42
+ }, z.core.$strip>;
43
+ /**
44
+ * Rental assignment schema.
45
+ * Records the physical rental unit assigned to a rental reservation.
46
+ *
47
+ * @typedef {Object} RentalAssignment
48
+ * @property {string} [locationId] - Business location where the rental unit is assigned
49
+ * @property {string} reservationId - Rental reservation ID
50
+ * @property {string} rentalInstanceId - Physical rental resource instance ID
51
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
52
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
53
+ * @property {RentalAssignmentType} assignmentType - Assignment lock type
54
+ * @property {RentalAssignmentStatus} status - Current assignment status
55
+ * @property {number} assignedAt - Assignment timestamp
56
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
57
+ * @property {number} [releasedAt] - Release timestamp
58
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
59
+ * @property {RentalUnitCondition} [conditionAtPickup] - Pickup condition snapshot
60
+ * @property {RentalUnitCondition} [conditionAtReturn] - Return condition snapshot
61
+ * @property {string} [notes] - Operational staff notes
62
+ */
63
+ export declare const RentalAssignmentSchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ createdAt: z.ZodOptional<z.ZodNumber>;
66
+ updatedAt: z.ZodOptional<z.ZodNumber>;
67
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ reservationId: z.ZodString;
69
+ rentalInstanceId: z.ZodString;
70
+ slotStart: z.ZodNumber;
71
+ slotEnd: z.ZodNumber;
72
+ assignmentType: z.ZodDefault<z.ZodEnum<typeof RentalAssignmentType>>;
73
+ status: z.ZodDefault<z.ZodEnum<typeof RentalAssignmentStatus>>;
74
+ assignedAt: z.ZodNumber;
75
+ assignedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ releasedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
77
+ releasedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ conditionAtPickup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
79
+ recordedAt: z.ZodNumber;
80
+ recordedBy: z.ZodString;
81
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ damageReported: z.ZodDefault<z.ZodBoolean>;
83
+ imageUrls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodURL>>>;
84
+ }, z.core.$strip>>>;
85
+ conditionAtReturn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
86
+ recordedAt: z.ZodNumber;
87
+ recordedBy: z.ZodString;
88
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ damageReported: z.ZodDefault<z.ZodBoolean>;
90
+ imageUrls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodURL>>>;
91
+ }, z.core.$strip>>>;
92
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ }, z.core.$strip>;
94
+ export type RentalUnitCondition = z.infer<typeof RentalUnitConditionSchema>;
95
+ export type RentalAssignment = z.infer<typeof RentalAssignmentSchema>;
96
+ /**
97
+ * Rental assignment filter options.
98
+ * @interface RentalAssignmentFilters
99
+ */
100
+ export interface RentalAssignmentFilters {
101
+ /** Filter by rental reservation ID */
102
+ reservationId?: string;
103
+ /** Filter by rental resource instance ID */
104
+ rentalInstanceId?: string;
105
+ /** Filter by assignment statuses */
106
+ status?: RentalAssignmentStatus[];
107
+ /** Filter by assignment lock type */
108
+ assignmentType?: RentalAssignmentType;
109
+ /** Filter by assigning staff user ID */
110
+ assignedBy?: string;
111
+ /** Filter by business location ID */
112
+ locationId?: string;
113
+ /** Filter assignments where damage was reported */
114
+ damageReported?: boolean;
115
+ }
116
+ /**
117
+ * Rental assignment sorting options.
118
+ * @interface RentalAssignmentSorting
119
+ */
120
+ export interface RentalAssignmentSorting {
121
+ /** Field to sort by */
122
+ field: "assignedAt" | "releasedAt" | "createdAt";
123
+ /** Sort direction */
124
+ direction: "asc" | "desc";
125
+ }
126
+ /**
127
+ * Rental assignment query options.
128
+ * @interface RentalAssignmentQueryOptions
129
+ */
130
+ export interface RentalAssignmentQueryOptions {
131
+ /** Page number (1-indexed) */
132
+ page: number;
133
+ /** Items per page */
134
+ pageSize: number;
135
+ /** Optional filters */
136
+ filters?: RentalAssignmentFilters;
137
+ /** Optional sorting */
138
+ sorting?: RentalAssignmentSorting;
139
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RentalAssignmentSchema = exports.RentalUnitConditionSchema = exports.RentalAssignmentType = exports.RentalAssignmentStatus = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_schema_1 = require("../../../base.schema");
6
+ /**
7
+ * @fileoverview Rental assignment schema definitions.
8
+ * @module business-mgt/reservation-mgt/assignment/rental-assignment
9
+ */
10
+ // ============================================================================
11
+ // ENUMS
12
+ // ============================================================================
13
+ /**
14
+ * Rental assignment lifecycle status.
15
+ *
16
+ * @enum {string}
17
+ */
18
+ var RentalAssignmentStatus;
19
+ (function (RentalAssignmentStatus) {
20
+ RentalAssignmentStatus["ASSIGNED"] = "assigned";
21
+ RentalAssignmentStatus["REASSIGNED"] = "reassigned";
22
+ RentalAssignmentStatus["RELEASED"] = "released";
23
+ })(RentalAssignmentStatus || (exports.RentalAssignmentStatus = RentalAssignmentStatus = {}));
24
+ /**
25
+ * Rental assignment lock type.
26
+ *
27
+ * @enum {string}
28
+ */
29
+ var RentalAssignmentType;
30
+ (function (RentalAssignmentType) {
31
+ RentalAssignmentType["SOFT"] = "soft";
32
+ RentalAssignmentType["HARD"] = "hard";
33
+ })(RentalAssignmentType || (exports.RentalAssignmentType = RentalAssignmentType = {}));
34
+ // ============================================================================
35
+ // RENTAL ASSIGNMENT SCHEMAS
36
+ // ============================================================================
37
+ /**
38
+ * Rental unit condition schema.
39
+ * Captures a condition inspection snapshot at pickup or return.
40
+ *
41
+ * @typedef {Object} RentalUnitCondition
42
+ * @property {number} recordedAt - Condition recording timestamp
43
+ * @property {string} recordedBy - Staff user ID that recorded the condition
44
+ * @property {string} [notes] - Condition notes
45
+ * @property {boolean} damageReported - Whether damage was reported
46
+ * @property {string[]} [imageUrls] - Condition photo URLs
47
+ */
48
+ exports.RentalUnitConditionSchema = zod_1.z.object({
49
+ recordedAt: zod_1.z.number().int().positive().describe("Unix timestamp when the condition was recorded."),
50
+ recordedBy: zod_1.z.string().describe("Staff user ID who recorded the condition."),
51
+ notes: zod_1.z.string().nullable().optional().describe("Condition notes recorded during inspection."),
52
+ damageReported: zod_1.z.boolean().default(false).describe("Whether damage was reported during this inspection."),
53
+ imageUrls: zod_1.z.array(zod_1.z.url()).nullable().optional().describe("Condition photo URLs captured during inspection."),
54
+ }).describe("Condition snapshot recorded at pickup or return");
55
+ /**
56
+ * Rental assignment schema.
57
+ * Records the physical rental unit assigned to a rental reservation.
58
+ *
59
+ * @typedef {Object} RentalAssignment
60
+ * @property {string} [locationId] - Business location where the rental unit is assigned
61
+ * @property {string} reservationId - Rental reservation ID
62
+ * @property {string} rentalInstanceId - Physical rental resource instance ID
63
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
64
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
65
+ * @property {RentalAssignmentType} assignmentType - Assignment lock type
66
+ * @property {RentalAssignmentStatus} status - Current assignment status
67
+ * @property {number} assignedAt - Assignment timestamp
68
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
69
+ * @property {number} [releasedAt] - Release timestamp
70
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
71
+ * @property {RentalUnitCondition} [conditionAtPickup] - Pickup condition snapshot
72
+ * @property {RentalUnitCondition} [conditionAtReturn] - Return condition snapshot
73
+ * @property {string} [notes] - Operational staff notes
74
+ */
75
+ exports.RentalAssignmentSchema = base_schema_1.BaseModelSchema.safeExtend({
76
+ locationId: zod_1.z.string().nullable().optional().describe("Business location ID where the assigned rental unit is located."),
77
+ reservationId: zod_1.z.string().describe("RentalReservation ID. This link is immutable after assignment creation."),
78
+ rentalInstanceId: zod_1.z.string().describe("ResourceInstance ID for the specific rental unit assigned to the reservation."),
79
+ slotStart: zod_1.z.number().int().positive().describe("Reservation slot start — copied from reservation at assignment time"),
80
+ slotEnd: zod_1.z.number().int().positive().describe("Reservation slot end — copied from reservation at assignment time"),
81
+ assignmentType: zod_1.z.enum(RentalAssignmentType).default(RentalAssignmentType.SOFT).describe("Assignment lock type. Soft assignments may be substituted; hard assignments are customer or staff locked."),
82
+ status: zod_1.z.enum(RentalAssignmentStatus).default(RentalAssignmentStatus.ASSIGNED).describe("Current assignment lifecycle status."),
83
+ assignedAt: zod_1.z.number().int().positive().describe("Unix timestamp when this assignment was made."),
84
+ assignedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who made the assignment."),
85
+ releasedAt: zod_1.z.number().int().positive().nullable().optional().describe("Unix timestamp when this assignment was released or superseded."),
86
+ releasedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who released the assignment."),
87
+ conditionAtPickup: exports.RentalUnitConditionSchema.nullable().optional().describe("Unit condition recorded at customer pickup."),
88
+ conditionAtReturn: exports.RentalUnitConditionSchema.nullable().optional().describe("Unit condition recorded at customer return."),
89
+ notes: zod_1.z.string().nullable().optional().describe("Operational note for staff about this rental assignment."),
90
+ });
@@ -0,0 +1,104 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * @fileoverview Room assignment schema definitions.
4
+ * @module business-mgt/reservation-mgt/assignment/room-assignment
5
+ */
6
+ /**
7
+ * Room assignment lifecycle status.
8
+ *
9
+ * @enum {string}
10
+ */
11
+ export declare enum RoomAssignmentStatus {
12
+ ASSIGNED = "assigned",
13
+ REASSIGNED = "reassigned",
14
+ RELEASED = "released"
15
+ }
16
+ /**
17
+ * Room assignment lock type.
18
+ *
19
+ * @enum {string}
20
+ */
21
+ export declare enum RoomAssignmentType {
22
+ SOFT = "soft",
23
+ HARD = "hard"
24
+ }
25
+ /**
26
+ * Room assignment schema.
27
+ * Records the physical room instance assigned to a room reservation.
28
+ *
29
+ * @typedef {Object} RoomAssignment
30
+ * @property {string} [locationId] - Business location where the room is assigned
31
+ * @property {string} reservationId - Room reservation ID
32
+ * @property {string} roomInstanceId - Physical room resource instance ID
33
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
34
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
35
+ * @property {RoomAssignmentType} assignmentType - Assignment lock type
36
+ * @property {RoomAssignmentStatus} status - Current assignment status
37
+ * @property {number} assignedAt - Assignment timestamp
38
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
39
+ * @property {number} [releasedAt] - Release timestamp
40
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
41
+ * @property {string} [housekeepingNotes] - Housekeeping handoff notes
42
+ * @property {string} [notes] - Operational staff notes
43
+ */
44
+ export declare const RoomAssignmentSchema: z.ZodObject<{
45
+ id: z.ZodString;
46
+ createdAt: z.ZodOptional<z.ZodNumber>;
47
+ updatedAt: z.ZodOptional<z.ZodNumber>;
48
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ reservationId: z.ZodString;
50
+ roomInstanceId: z.ZodString;
51
+ slotStart: z.ZodNumber;
52
+ slotEnd: z.ZodNumber;
53
+ assignmentType: z.ZodDefault<z.ZodEnum<typeof RoomAssignmentType>>;
54
+ status: z.ZodDefault<z.ZodEnum<typeof RoomAssignmentStatus>>;
55
+ assignedAt: z.ZodNumber;
56
+ assignedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ releasedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
+ releasedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ housekeepingNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ }, z.core.$strip>;
62
+ export type RoomAssignment = z.infer<typeof RoomAssignmentSchema>;
63
+ /**
64
+ * Room assignment filter options.
65
+ * @interface RoomAssignmentFilters
66
+ */
67
+ export interface RoomAssignmentFilters {
68
+ /** Filter by room reservation ID */
69
+ reservationId?: string;
70
+ /** Filter by room resource instance ID */
71
+ roomInstanceId?: string;
72
+ /** Filter by assignment statuses */
73
+ status?: RoomAssignmentStatus[];
74
+ /** Filter by assignment lock type */
75
+ assignmentType?: RoomAssignmentType;
76
+ /** Filter by assigning staff user ID */
77
+ assignedBy?: string;
78
+ /** Filter by business location ID */
79
+ locationId?: string;
80
+ }
81
+ /**
82
+ * Room assignment sorting options.
83
+ * @interface RoomAssignmentSorting
84
+ */
85
+ export interface RoomAssignmentSorting {
86
+ /** Field to sort by */
87
+ field: "assignedAt" | "releasedAt" | "createdAt";
88
+ /** Sort direction */
89
+ direction: "asc" | "desc";
90
+ }
91
+ /**
92
+ * Room assignment query options.
93
+ * @interface RoomAssignmentQueryOptions
94
+ */
95
+ export interface RoomAssignmentQueryOptions {
96
+ /** Page number (1-indexed) */
97
+ page: number;
98
+ /** Items per page */
99
+ pageSize: number;
100
+ /** Optional filters */
101
+ filters?: RoomAssignmentFilters;
102
+ /** Optional sorting */
103
+ sorting?: RoomAssignmentSorting;
104
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoomAssignmentSchema = exports.RoomAssignmentType = exports.RoomAssignmentStatus = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_schema_1 = require("../../../base.schema");
6
+ /**
7
+ * @fileoverview Room assignment schema definitions.
8
+ * @module business-mgt/reservation-mgt/assignment/room-assignment
9
+ */
10
+ // ============================================================================
11
+ // ENUMS
12
+ // ============================================================================
13
+ /**
14
+ * Room assignment lifecycle status.
15
+ *
16
+ * @enum {string}
17
+ */
18
+ var RoomAssignmentStatus;
19
+ (function (RoomAssignmentStatus) {
20
+ RoomAssignmentStatus["ASSIGNED"] = "assigned";
21
+ RoomAssignmentStatus["REASSIGNED"] = "reassigned";
22
+ RoomAssignmentStatus["RELEASED"] = "released";
23
+ })(RoomAssignmentStatus || (exports.RoomAssignmentStatus = RoomAssignmentStatus = {}));
24
+ /**
25
+ * Room assignment lock type.
26
+ *
27
+ * @enum {string}
28
+ */
29
+ var RoomAssignmentType;
30
+ (function (RoomAssignmentType) {
31
+ RoomAssignmentType["SOFT"] = "soft";
32
+ RoomAssignmentType["HARD"] = "hard";
33
+ })(RoomAssignmentType || (exports.RoomAssignmentType = RoomAssignmentType = {}));
34
+ // ============================================================================
35
+ // ROOM ASSIGNMENT SCHEMA
36
+ // ============================================================================
37
+ /**
38
+ * Room assignment schema.
39
+ * Records the physical room instance assigned to a room reservation.
40
+ *
41
+ * @typedef {Object} RoomAssignment
42
+ * @property {string} [locationId] - Business location where the room is assigned
43
+ * @property {string} reservationId - Room reservation ID
44
+ * @property {string} roomInstanceId - Physical room resource instance ID
45
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
46
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
47
+ * @property {RoomAssignmentType} assignmentType - Assignment lock type
48
+ * @property {RoomAssignmentStatus} status - Current assignment status
49
+ * @property {number} assignedAt - Assignment timestamp
50
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
51
+ * @property {number} [releasedAt] - Release timestamp
52
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
53
+ * @property {string} [housekeepingNotes] - Housekeeping handoff notes
54
+ * @property {string} [notes] - Operational staff notes
55
+ */
56
+ exports.RoomAssignmentSchema = base_schema_1.BaseModelSchema.safeExtend({
57
+ locationId: zod_1.z.string().nullable().optional().describe("Business location ID where the assigned room is located."),
58
+ reservationId: zod_1.z.string().describe("RoomReservation ID. This link is immutable after assignment creation."),
59
+ roomInstanceId: zod_1.z.string().describe("ResourceInstance ID for the physical room assigned to the reservation."),
60
+ slotStart: zod_1.z.number().int().positive().describe("Reservation slot start — copied from reservation at assignment time"),
61
+ slotEnd: zod_1.z.number().int().positive().describe("Reservation slot end — copied from reservation at assignment time"),
62
+ assignmentType: zod_1.z.enum(RoomAssignmentType).default(RoomAssignmentType.SOFT).describe("Assignment lock type. Soft assignments may be optimized; hard assignments are staff-locked."),
63
+ status: zod_1.z.enum(RoomAssignmentStatus).default(RoomAssignmentStatus.ASSIGNED).describe("Current assignment lifecycle status."),
64
+ assignedAt: zod_1.z.number().int().positive().describe("Unix timestamp when this assignment was made."),
65
+ assignedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who made the assignment."),
66
+ releasedAt: zod_1.z.number().int().positive().nullable().optional().describe("Unix timestamp when this assignment was released or superseded."),
67
+ releasedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who released the assignment."),
68
+ housekeepingNotes: zod_1.z.string().nullable().optional().describe("Housekeeping handoff notes for this room and guest pairing."),
69
+ notes: zod_1.z.string().nullable().optional().describe("Operational note for staff about this room assignment."),
70
+ });
@@ -0,0 +1,104 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * @fileoverview Table assignment schema definitions.
4
+ * @module business-mgt/reservation-mgt/assignment/table-assignment
5
+ */
6
+ /**
7
+ * Table assignment lock type.
8
+ *
9
+ * @enum {string}
10
+ */
11
+ export declare enum TableAssignmentType {
12
+ SOFT = "soft",
13
+ HARD = "hard"
14
+ }
15
+ /**
16
+ * Table assignment lifecycle status.
17
+ *
18
+ * @enum {string}
19
+ */
20
+ export declare enum TableAssignmentStatus {
21
+ ASSIGNED = "assigned",
22
+ REASSIGNED = "reassigned",
23
+ RELEASED = "released"
24
+ }
25
+ /**
26
+ * Table assignment schema.
27
+ * Records the physical table instance assigned to a table reservation.
28
+ *
29
+ * @typedef {Object} TableAssignment
30
+ * @property {string} [locationId] - Business location where the table is assigned
31
+ * @property {string} reservationId - Table reservation ID
32
+ * @property {string} tableInstanceId - Physical table resource instance ID
33
+ * @property {string} floorPlanId - Floor plan ID captured at assignment time
34
+ * @property {string} [floorPlanSectionId] - Floor plan section ID captured at assignment time
35
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
36
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
37
+ * @property {TableAssignmentType} assignmentType - Assignment lock type
38
+ * @property {TableAssignmentStatus} status - Current assignment status
39
+ * @property {number} assignedAt - Assignment timestamp
40
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
41
+ * @property {number} [releasedAt] - Release timestamp
42
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
43
+ * @property {string} [notes] - Operational staff notes
44
+ */
45
+ export declare const TableAssignmentSchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ createdAt: z.ZodOptional<z.ZodNumber>;
48
+ updatedAt: z.ZodOptional<z.ZodNumber>;
49
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ reservationId: z.ZodString;
51
+ tableInstanceId: z.ZodString;
52
+ floorPlanId: z.ZodString;
53
+ floorPlanSectionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ slotStart: z.ZodNumber;
55
+ slotEnd: z.ZodNumber;
56
+ assignmentType: z.ZodDefault<z.ZodEnum<typeof TableAssignmentType>>;
57
+ status: z.ZodDefault<z.ZodEnum<typeof TableAssignmentStatus>>;
58
+ assignedAt: z.ZodNumber;
59
+ assignedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ releasedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ releasedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ }, z.core.$strip>;
64
+ export type TableAssignment = z.infer<typeof TableAssignmentSchema>;
65
+ /**
66
+ * Table assignment filter options.
67
+ * @interface TableAssignmentFilters
68
+ */
69
+ export interface TableAssignmentFilters {
70
+ /** Filter by table reservation ID */
71
+ reservationId?: string;
72
+ /** Filter by table resource instance ID */
73
+ tableInstanceId?: string;
74
+ /** Filter by assignment statuses */
75
+ status?: TableAssignmentStatus[];
76
+ /** Filter by assigning staff user ID */
77
+ assignedBy?: string;
78
+ /** Filter by business location ID */
79
+ locationId?: string;
80
+ }
81
+ /**
82
+ * Table assignment sorting options.
83
+ * @interface TableAssignmentSorting
84
+ */
85
+ export interface TableAssignmentSorting {
86
+ /** Field to sort by */
87
+ field: "assignedAt" | "releasedAt" | "createdAt";
88
+ /** Sort direction */
89
+ direction: "asc" | "desc";
90
+ }
91
+ /**
92
+ * Table assignment query options.
93
+ * @interface TableAssignmentQueryOptions
94
+ */
95
+ export interface TableAssignmentQueryOptions {
96
+ /** Page number (1-indexed) */
97
+ page: number;
98
+ /** Items per page */
99
+ pageSize: number;
100
+ /** Optional filters */
101
+ filters?: TableAssignmentFilters;
102
+ /** Optional sorting */
103
+ sorting?: TableAssignmentSorting;
104
+ }