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,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TableAssignmentSchema = exports.TableAssignmentStatus = exports.TableAssignmentType = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_schema_1 = require("../../../base.schema");
6
+ /**
7
+ * @fileoverview Table assignment schema definitions.
8
+ * @module business-mgt/reservation-mgt/assignment/table-assignment
9
+ */
10
+ // ============================================================================
11
+ // ENUMS
12
+ // ============================================================================
13
+ /**
14
+ * Table assignment lock type.
15
+ *
16
+ * @enum {string}
17
+ */
18
+ var TableAssignmentType;
19
+ (function (TableAssignmentType) {
20
+ TableAssignmentType["SOFT"] = "soft";
21
+ TableAssignmentType["HARD"] = "hard";
22
+ })(TableAssignmentType || (exports.TableAssignmentType = TableAssignmentType = {}));
23
+ /**
24
+ * Table assignment lifecycle status.
25
+ *
26
+ * @enum {string}
27
+ */
28
+ var TableAssignmentStatus;
29
+ (function (TableAssignmentStatus) {
30
+ TableAssignmentStatus["ASSIGNED"] = "assigned";
31
+ TableAssignmentStatus["REASSIGNED"] = "reassigned";
32
+ TableAssignmentStatus["RELEASED"] = "released";
33
+ })(TableAssignmentStatus || (exports.TableAssignmentStatus = TableAssignmentStatus = {}));
34
+ // ============================================================================
35
+ // TABLE ASSIGNMENT SCHEMA
36
+ // ============================================================================
37
+ /**
38
+ * Table assignment schema.
39
+ * Records the physical table instance assigned to a table reservation.
40
+ *
41
+ * @typedef {Object} TableAssignment
42
+ * @property {string} [locationId] - Business location where the table is assigned
43
+ * @property {string} reservationId - Table reservation ID
44
+ * @property {string} tableInstanceId - Physical table resource instance ID
45
+ * @property {string} floorPlanId - Floor plan ID captured at assignment time
46
+ * @property {string} [floorPlanSectionId] - Floor plan section ID captured at assignment time
47
+ * @property {number} slotStart - Reservation slot start, copied from reservation at assignment time
48
+ * @property {number} slotEnd - Reservation slot end, copied from reservation at assignment time
49
+ * @property {TableAssignmentType} assignmentType - Assignment lock type
50
+ * @property {TableAssignmentStatus} status - Current assignment status
51
+ * @property {number} assignedAt - Assignment timestamp
52
+ * @property {string} [assignedBy] - Staff user ID that made the assignment
53
+ * @property {number} [releasedAt] - Release timestamp
54
+ * @property {string} [releasedBy] - Staff user ID that released the assignment
55
+ * @property {string} [notes] - Operational staff notes
56
+ */
57
+ exports.TableAssignmentSchema = base_schema_1.BaseModelSchema.safeExtend({
58
+ locationId: zod_1.z.string().nullable().optional().describe("Business location ID where the assigned table is located."),
59
+ reservationId: zod_1.z.string().describe("TableReservation ID. This link is immutable after assignment creation."),
60
+ tableInstanceId: zod_1.z.string().describe("ResourceInstance ID for the physical table assigned to the reservation."),
61
+ floorPlanId: zod_1.z.string().describe("Floor plan ID captured at the time of assignment."),
62
+ floorPlanSectionId: zod_1.z.string().nullable().optional().describe("Floor plan section ID captured at the time of assignment."),
63
+ slotStart: zod_1.z.number().int().positive().describe("Reservation slot start — copied from reservation at assignment time"),
64
+ slotEnd: zod_1.z.number().int().positive().describe("Reservation slot end — copied from reservation at assignment time"),
65
+ assignmentType: zod_1.z.enum(TableAssignmentType).default(TableAssignmentType.SOFT).describe("Assignment lock type. Soft assignments may be optimized; hard assignments are staff-locked."),
66
+ status: zod_1.z.enum(TableAssignmentStatus).default(TableAssignmentStatus.ASSIGNED).describe("Current assignment lifecycle status."),
67
+ assignedAt: zod_1.z.number().int().positive().describe("Unix timestamp when this assignment was made."),
68
+ assignedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who made the assignment."),
69
+ releasedAt: zod_1.z.number().int().positive().nullable().optional().describe("Unix timestamp when this assignment was released or superseded."),
70
+ releasedBy: zod_1.z.string().nullable().optional().describe("Staff user ID who released the assignment."),
71
+ notes: zod_1.z.string().nullable().optional().describe("Operational note for staff about this table assignment."),
72
+ });
@@ -0,0 +1,14 @@
1
+ export * from "./reservation-table.schema";
2
+ export * from "./reservation-room.schema";
3
+ export * from "./reservation-rental.schema";
4
+ export * from "./assignment";
5
+ export * from "./resource/reservation-resource-category.schema";
6
+ export * from "./resource/reservation-resource-instance.schema";
7
+ export * from "./resource/reservation-resource.schema";
8
+ export * from "./reservation-slot-query.schema";
9
+ export * from "./reservation-maintenance-block.schema";
10
+ export * from "./reservation-table-layout.schema";
11
+ export * from "./reservation-section.schema";
12
+ export * from "./reservation-floor-plan-definition.schema";
13
+ export * from "./reservation-settings.schema";
14
+ export * from "./resource/resource-versioning.schema";
@@ -0,0 +1,31 @@
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
+ // export * from "./reservation.schema";
18
+ __exportStar(require("./reservation-table.schema"), exports);
19
+ __exportStar(require("./reservation-room.schema"), exports);
20
+ __exportStar(require("./reservation-rental.schema"), exports);
21
+ __exportStar(require("./assignment"), exports);
22
+ __exportStar(require("./resource/reservation-resource-category.schema"), exports);
23
+ __exportStar(require("./resource/reservation-resource-instance.schema"), exports);
24
+ __exportStar(require("./resource/reservation-resource.schema"), exports);
25
+ __exportStar(require("./reservation-slot-query.schema"), exports);
26
+ __exportStar(require("./reservation-maintenance-block.schema"), exports);
27
+ __exportStar(require("./reservation-table-layout.schema"), exports);
28
+ __exportStar(require("./reservation-section.schema"), exports);
29
+ __exportStar(require("./reservation-floor-plan-definition.schema"), exports);
30
+ __exportStar(require("./reservation-settings.schema"), exports);
31
+ __exportStar(require("./resource/resource-versioning.schema"), exports);
@@ -0,0 +1,180 @@
1
+ import { z } from "zod";
2
+ import { TableShape } from "./reservation-section.schema";
3
+ /**
4
+ * @fileoverview Aggregate floor plan definition schemas.
5
+ * @module business-mgt/reservation-mgt/floor-plan-definition
6
+ *
7
+ * Composes the floor plan, its sections, and nested table placements into a single
8
+ * graph. The Create* variants support atomic creation of a floor plan together with
9
+ * its sections and tables in one payload, while the response variant returns the
10
+ * fully hydrated graph.
11
+ */
12
+ export declare const CreateFloorPlanTablePlacementInputSchema: z.ZodObject<{
13
+ number: z.ZodString;
14
+ x: z.ZodNumber;
15
+ y: z.ZodNumber;
16
+ width: z.ZodNumber;
17
+ height: z.ZodNumber;
18
+ shape: z.ZodEnum<typeof TableShape>;
19
+ rotation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
+ minParty: z.ZodNumber;
21
+ maxParty: z.ZodNumber;
22
+ combinableWith: z.ZodDefault<z.ZodArray<z.ZodString>>;
23
+ serverSectionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ }, z.core.$strip>;
25
+ export declare const CreateFloorPlanSectionInputSchema: z.ZodObject<{
26
+ name: z.ZodString;
27
+ capacity: z.ZodNumber;
28
+ color: z.ZodString;
29
+ isActive: z.ZodDefault<z.ZodBoolean>;
30
+ sortOrder: z.ZodDefault<z.ZodNumber>;
31
+ geometry: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ kind: z.ZodLiteral<"auto">;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ kind: z.ZodLiteral<"rect">;
35
+ x: z.ZodNumber;
36
+ y: z.ZodNumber;
37
+ width: z.ZodNumber;
38
+ height: z.ZodNumber;
39
+ rotation: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ kind: z.ZodLiteral<"polygon">;
42
+ points: z.ZodArray<z.ZodObject<{
43
+ x: z.ZodNumber;
44
+ y: z.ZodNumber;
45
+ }, z.core.$strip>>;
46
+ rotation: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strip>], "kind">>>;
48
+ tables: z.ZodArray<z.ZodObject<{
49
+ number: z.ZodString;
50
+ x: z.ZodNumber;
51
+ y: z.ZodNumber;
52
+ width: z.ZodNumber;
53
+ height: z.ZodNumber;
54
+ shape: z.ZodEnum<typeof TableShape>;
55
+ rotation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
56
+ minParty: z.ZodNumber;
57
+ maxParty: z.ZodNumber;
58
+ combinableWith: z.ZodDefault<z.ZodArray<z.ZodString>>;
59
+ serverSectionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ }, z.core.$strip>>;
61
+ }, z.core.$strip>;
62
+ export declare const CreateFloorPlanDefinitionSchema: z.ZodObject<{
63
+ capacity: z.ZodNumber;
64
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
65
+ name: z.ZodString;
66
+ description: z.ZodString;
67
+ isActive: z.ZodDefault<z.ZodBoolean>;
68
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ imageUrls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodURL>>>;
70
+ canvasDimensions: z.ZodObject<{
71
+ width: z.ZodNumber;
72
+ height: z.ZodNumber;
73
+ unit: z.ZodDefault<z.ZodEnum<typeof import("./reservation-table-layout.schema").CanvasUnit>>;
74
+ }, z.core.$strip>;
75
+ sections: z.ZodArray<z.ZodObject<{
76
+ name: z.ZodString;
77
+ capacity: z.ZodNumber;
78
+ color: z.ZodString;
79
+ isActive: z.ZodDefault<z.ZodBoolean>;
80
+ sortOrder: z.ZodDefault<z.ZodNumber>;
81
+ geometry: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
82
+ kind: z.ZodLiteral<"auto">;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ kind: z.ZodLiteral<"rect">;
85
+ x: z.ZodNumber;
86
+ y: z.ZodNumber;
87
+ width: z.ZodNumber;
88
+ height: z.ZodNumber;
89
+ rotation: z.ZodOptional<z.ZodNumber>;
90
+ }, z.core.$strip>, z.ZodObject<{
91
+ kind: z.ZodLiteral<"polygon">;
92
+ points: z.ZodArray<z.ZodObject<{
93
+ x: z.ZodNumber;
94
+ y: z.ZodNumber;
95
+ }, z.core.$strip>>;
96
+ rotation: z.ZodOptional<z.ZodNumber>;
97
+ }, z.core.$strip>], "kind">>>;
98
+ tables: z.ZodArray<z.ZodObject<{
99
+ number: z.ZodString;
100
+ x: z.ZodNumber;
101
+ y: z.ZodNumber;
102
+ width: z.ZodNumber;
103
+ height: z.ZodNumber;
104
+ shape: z.ZodEnum<typeof TableShape>;
105
+ rotation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
106
+ minParty: z.ZodNumber;
107
+ maxParty: z.ZodNumber;
108
+ combinableWith: z.ZodDefault<z.ZodArray<z.ZodString>>;
109
+ serverSectionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ }, z.core.$strip>>;
111
+ }, z.core.$strip>>;
112
+ }, z.core.$strip>;
113
+ export type CreateFloorPlanTablePlacementInput = z.infer<typeof CreateFloorPlanTablePlacementInputSchema>;
114
+ export type CreateFloorPlanSectionInput = z.infer<typeof CreateFloorPlanSectionInputSchema>;
115
+ export type CreateFloorPlanDefinition = z.infer<typeof CreateFloorPlanDefinitionSchema>;
116
+ export declare const FloorPlanDefinitionSchema: z.ZodObject<{
117
+ id: z.ZodString;
118
+ createdAt: z.ZodOptional<z.ZodNumber>;
119
+ updatedAt: z.ZodOptional<z.ZodNumber>;
120
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ name: z.ZodString;
122
+ description: z.ZodString;
123
+ imageUrls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodURL>>>;
124
+ isActive: z.ZodDefault<z.ZodBoolean>;
125
+ canvasDimensions: z.ZodObject<{
126
+ width: z.ZodNumber;
127
+ height: z.ZodNumber;
128
+ unit: z.ZodDefault<z.ZodEnum<typeof import("./reservation-table-layout.schema").CanvasUnit>>;
129
+ }, z.core.$strip>;
130
+ capacity: z.ZodNumber;
131
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
132
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
133
+ id: z.ZodString;
134
+ createdAt: z.ZodOptional<z.ZodNumber>;
135
+ updatedAt: z.ZodOptional<z.ZodNumber>;
136
+ locationId: z.ZodString;
137
+ floorPlanId: z.ZodString;
138
+ name: z.ZodString;
139
+ capacity: z.ZodNumber;
140
+ color: z.ZodString;
141
+ isActive: z.ZodDefault<z.ZodBoolean>;
142
+ sortOrder: z.ZodDefault<z.ZodNumber>;
143
+ tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
144
+ id: z.ZodString;
145
+ createdAt: z.ZodOptional<z.ZodNumber>;
146
+ updatedAt: z.ZodOptional<z.ZodNumber>;
147
+ tableResourceId: z.ZodString;
148
+ floorPlanSectionId: z.ZodString;
149
+ number: z.ZodString;
150
+ x: z.ZodNumber;
151
+ y: z.ZodNumber;
152
+ width: z.ZodNumber;
153
+ height: z.ZodNumber;
154
+ shape: z.ZodEnum<typeof TableShape>;
155
+ rotation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
156
+ minParty: z.ZodNumber;
157
+ maxParty: z.ZodNumber;
158
+ combinableWith: z.ZodDefault<z.ZodArray<z.ZodString>>;
159
+ serverSectionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ }, z.core.$strip>>>;
161
+ geometry: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
162
+ kind: z.ZodLiteral<"auto">;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ kind: z.ZodLiteral<"rect">;
165
+ x: z.ZodNumber;
166
+ y: z.ZodNumber;
167
+ width: z.ZodNumber;
168
+ height: z.ZodNumber;
169
+ rotation: z.ZodOptional<z.ZodNumber>;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ kind: z.ZodLiteral<"polygon">;
172
+ points: z.ZodArray<z.ZodObject<{
173
+ x: z.ZodNumber;
174
+ y: z.ZodNumber;
175
+ }, z.core.$strip>>;
176
+ rotation: z.ZodOptional<z.ZodNumber>;
177
+ }, z.core.$strip>], "kind">>>;
178
+ }, z.core.$strip>>>;
179
+ }, z.core.$strip>;
180
+ export type FloorPlanDefinition = z.infer<typeof FloorPlanDefinitionSchema>;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FloorPlanDefinitionSchema = exports.CreateFloorPlanDefinitionSchema = exports.CreateFloorPlanSectionInputSchema = exports.CreateFloorPlanTablePlacementInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const reservation_table_layout_schema_1 = require("./reservation-table-layout.schema");
6
+ const reservation_section_schema_1 = require("./reservation-section.schema");
7
+ /**
8
+ * @fileoverview Aggregate floor plan definition schemas.
9
+ * @module business-mgt/reservation-mgt/floor-plan-definition
10
+ *
11
+ * Composes the floor plan, its sections, and nested table placements into a single
12
+ * graph. The Create* variants support atomic creation of a floor plan together with
13
+ * its sections and tables in one payload, while the response variant returns the
14
+ * fully hydrated graph.
15
+ */
16
+ // === CreateFloorPlanDefinition: Atomic creation of floor plan with nested sections and tables ===
17
+ exports.CreateFloorPlanTablePlacementInputSchema = zod_1.z.object({
18
+ number: zod_1.z.string().describe("Human-readable table number"),
19
+ x: zod_1.z.number().describe("Table x position in layout coordinate space"),
20
+ y: zod_1.z.number().describe("Table y position in layout coordinate space"),
21
+ width: zod_1.z.number().positive().describe("Table width in layout units"),
22
+ height: zod_1.z.number().positive().describe("Table height in layout units"),
23
+ shape: zod_1.z.enum(reservation_section_schema_1.TableShape).describe("Rendered table shape"),
24
+ rotation: zod_1.z.number().nullable().optional().describe("Optional table rotation in degrees"),
25
+ minParty: zod_1.z.number().int().positive().describe("Minimum supported party size"),
26
+ maxParty: zod_1.z.number().int().positive().describe("Maximum supported party size"),
27
+ combinableWith: zod_1.z.array(zod_1.z.string()).default([]).describe("Table numbers that can be combined with this table"),
28
+ serverSectionId: zod_1.z.string().nullable().optional().describe("Server section assignment"),
29
+ }).superRefine((data, ctx) => {
30
+ if (data.maxParty < data.minParty) {
31
+ ctx.addIssue({
32
+ code: "custom",
33
+ path: ["maxParty"],
34
+ message: "maxParty must be greater than or equal to minParty",
35
+ });
36
+ }
37
+ });
38
+ exports.CreateFloorPlanSectionInputSchema = zod_1.z.object({
39
+ name: zod_1.z.string().min(1).describe("Section name (e.g., Patio, Main Dining, Bar)"),
40
+ capacity: zod_1.z.number().int().positive().describe("Total seating capacity of the section"),
41
+ color: zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/).describe("Hex color for floor plan rendering"),
42
+ isActive: zod_1.z.boolean().default(true).describe("Whether section is currently active"),
43
+ sortOrder: zod_1.z.number().int().nonnegative().default(0).describe("Display order in lists"),
44
+ geometry: reservation_section_schema_1.SectionGeometrySchema.nullable().optional(),
45
+ tables: zod_1.z.array(exports.CreateFloorPlanTablePlacementInputSchema).min(1, "Each section must have at least one table").describe("Tables in this section"),
46
+ }).superRefine((data, ctx) => {
47
+ if (!Array.isArray(data.tables) || data.tables.length === 0)
48
+ return;
49
+ const tablesMaxPartySum = data.tables.reduce((sum, table) => sum + (table?.maxParty ?? 0), 0);
50
+ if (tablesMaxPartySum !== data.capacity) {
51
+ ctx.addIssue({
52
+ code: "custom",
53
+ path: ["capacity"],
54
+ message: `Section capacity (${data.capacity}) must equal the sum of its table maxParty values (${tablesMaxPartySum})`,
55
+ });
56
+ }
57
+ });
58
+ exports.CreateFloorPlanDefinitionSchema = reservation_table_layout_schema_1.CreateFloorPlanSchema.extend({
59
+ sections: zod_1.z.array(exports.CreateFloorPlanSectionInputSchema).min(1, "At least one section must be defined").describe("Sections with nested table placements"),
60
+ }).superRefine((data, ctx) => {
61
+ if (!Array.isArray(data.sections) || data.sections.length === 0)
62
+ return;
63
+ const sectionsCapacitySum = data.sections.reduce((sum, section) => sum + (section?.capacity ?? 0), 0);
64
+ if (sectionsCapacitySum !== data.capacity) {
65
+ ctx.addIssue({
66
+ code: "custom",
67
+ path: ["capacity"],
68
+ message: `Floor plan capacity (${data.capacity}) must equal the sum of its section capacities (${sectionsCapacitySum})`,
69
+ });
70
+ }
71
+ });
72
+ // === FloorPlanDefinition: Graph response with nested sections and tables ===
73
+ exports.FloorPlanDefinitionSchema = reservation_table_layout_schema_1.FloorPlanSchema.extend({
74
+ sections: zod_1.z.array(reservation_section_schema_1.SectionSchema).default([]).describe("Sections with nested table placements"),
75
+ });
@@ -0,0 +1,91 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * @fileoverview Reservation maintenance block schema definitions.
4
+ * @module business-mgt/reservation-mgt/maintenance-block
5
+ */
6
+ /**
7
+ * Maintenance block schema.
8
+ * Represents a time period when a reservable resource instance is unavailable.
9
+ *
10
+ * @typedef {Object} MaintenanceBlock
11
+ * @property {string} [locationId] - Business location where maintenance applies
12
+ * @property {string} resourceInstanceId - Physical resource instance under maintenance
13
+ * @property {number} startDate - Maintenance block start as Unix epoch seconds
14
+ * @property {number} endDate - Maintenance block end as Unix epoch seconds
15
+ * @property {string} [reason] - Operational reason for the maintenance block
16
+ */
17
+ export declare const MaintenanceBlockSchema: z.ZodObject<{
18
+ id: z.ZodString;
19
+ createdAt: z.ZodOptional<z.ZodNumber>;
20
+ updatedAt: z.ZodOptional<z.ZodNumber>;
21
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ resourceInstanceId: z.ZodString;
23
+ startDate: z.ZodNumber;
24
+ endDate: z.ZodNumber;
25
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ }, z.core.$strip>;
27
+ /**
28
+ * Schema for creating a new maintenance block.
29
+ * Omits auto-generated fields.
30
+ */
31
+ export declare const CreateMaintenanceBlockSchema: z.ZodObject<{
32
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ locationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ resourceInstanceId: z.ZodString;
35
+ startDate: z.ZodNumber;
36
+ endDate: z.ZodNumber;
37
+ }, z.core.$strip>;
38
+ /**
39
+ * Schema for updating an existing maintenance block.
40
+ * All fields optional except id.
41
+ */
42
+ export declare const UpdateMaintenanceBlockSchema: z.ZodObject<{
43
+ reason: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
44
+ locationId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
45
+ resourceInstanceId: z.ZodOptional<z.ZodString>;
46
+ startDate: z.ZodOptional<z.ZodNumber>;
47
+ endDate: z.ZodOptional<z.ZodNumber>;
48
+ id: z.ZodString;
49
+ }, z.core.$strip>;
50
+ export type MaintenanceBlock = z.infer<typeof MaintenanceBlockSchema>;
51
+ export type CreateMaintenanceBlock = z.infer<typeof CreateMaintenanceBlockSchema>;
52
+ export type UpdateMaintenanceBlock = z.infer<typeof UpdateMaintenanceBlockSchema>;
53
+ /**
54
+ * Maintenance block filter options.
55
+ * @interface MaintenanceBlockFilters
56
+ */
57
+ export interface MaintenanceBlockFilters {
58
+ /** Filter by maintained resource instance ID */
59
+ resourceInstanceId?: string;
60
+ /** Filter by business location ID */
61
+ locationId?: string;
62
+ /** Filter by maintenance date range (Unix epoch seconds) */
63
+ dateRange?: {
64
+ start?: number;
65
+ end?: number;
66
+ };
67
+ }
68
+ /**
69
+ * Maintenance block sorting options.
70
+ * @interface MaintenanceBlockSorting
71
+ */
72
+ export interface MaintenanceBlockSorting {
73
+ /** Field to sort by */
74
+ field: "startDate" | "endDate" | "createdAt";
75
+ /** Sort direction */
76
+ direction: "asc" | "desc";
77
+ }
78
+ /**
79
+ * Maintenance block query options.
80
+ * @interface MaintenanceBlockQueryOptions
81
+ */
82
+ export interface MaintenanceBlockQueryOptions {
83
+ /** Page number (1-indexed) */
84
+ page: number;
85
+ /** Items per page */
86
+ pageSize: number;
87
+ /** Optional filters */
88
+ filters?: MaintenanceBlockFilters;
89
+ /** Optional sorting */
90
+ sorting?: MaintenanceBlockSorting;
91
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateMaintenanceBlockSchema = exports.CreateMaintenanceBlockSchema = exports.MaintenanceBlockSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_schema_1 = require("../../base.schema");
6
+ /**
7
+ * @fileoverview Reservation maintenance block schema definitions.
8
+ * @module business-mgt/reservation-mgt/maintenance-block
9
+ */
10
+ // ============================================================================
11
+ // MAINTENANCE BLOCK SCHEMA
12
+ // ============================================================================
13
+ /**
14
+ * Maintenance block schema.
15
+ * Represents a time period when a reservable resource instance is unavailable.
16
+ *
17
+ * @typedef {Object} MaintenanceBlock
18
+ * @property {string} [locationId] - Business location where maintenance applies
19
+ * @property {string} resourceInstanceId - Physical resource instance under maintenance
20
+ * @property {number} startDate - Maintenance block start as Unix epoch seconds
21
+ * @property {number} endDate - Maintenance block end as Unix epoch seconds
22
+ * @property {string} [reason] - Operational reason for the maintenance block
23
+ */
24
+ exports.MaintenanceBlockSchema = base_schema_1.BaseModelSchema.safeExtend({
25
+ locationId: zod_1.z.string().nullable().optional().describe("Business location ID where the maintenance block applies. Null applies when the resource is not location-specific."),
26
+ resourceInstanceId: zod_1.z.string().describe("Room/resource ID under maintenance"),
27
+ startDate: zod_1.z.number().describe("Maintenance block start as Unix epoch seconds"),
28
+ endDate: zod_1.z.number().describe("Maintenance block end as Unix epoch seconds"),
29
+ reason: zod_1.z.string().nullable().optional().describe("Reason for maintenance block"),
30
+ }).superRefine((data, ctx) => {
31
+ if (data.endDate < data.startDate) {
32
+ ctx.addIssue({
33
+ code: "custom",
34
+ path: ["endDate"],
35
+ message: "endDate must be greater than or equal to startDate",
36
+ });
37
+ }
38
+ });
39
+ // ============================================================================
40
+ // CREATE/UPDATE SCHEMAS
41
+ // ============================================================================
42
+ /**
43
+ * Schema for creating a new maintenance block.
44
+ * Omits auto-generated fields.
45
+ */
46
+ exports.CreateMaintenanceBlockSchema = exports.MaintenanceBlockSchema.omit({
47
+ id: true,
48
+ createdAt: true,
49
+ updatedAt: true,
50
+ });
51
+ /**
52
+ * Schema for updating an existing maintenance block.
53
+ * All fields optional except id.
54
+ */
55
+ exports.UpdateMaintenanceBlockSchema = exports.CreateMaintenanceBlockSchema.partial().safeExtend({
56
+ id: zod_1.z.string().describe("Unique identifier of the maintenance block to update."),
57
+ });