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,78 @@
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.UpdateAppointmentAdditionalInfoSchema = exports.CreateAppointmentAdditionalInfoSchema = exports.AppointmentAdditionalInfoSchema = exports.DynamicFieldValueSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const base_schema_1 = require("../../base.schema");
9
+ /**
10
+ * @fileoverview Appointment Additional Info schema for storing dynamic field values.
11
+ * @module business-mgt/appointment-additional-info
12
+ *
13
+ * This schema represents the **Appointment Level** in the dynamic fields hierarchy:
14
+ *
15
+ * ```
16
+ * Organization Level (AppointmentFieldConfigSchema)
17
+ * │
18
+ * ▼ inherits via appointmentFieldConfigId
19
+ * Service Level (ServiceAppointmentFieldConfigSchema)
20
+ * │
21
+ * ▼ stores values
22
+ * Appointment Level (AppointmentAdditionalInfoSchema) ← THIS SCHEMA
23
+ * ```
24
+ *
25
+ * Stores the actual captured field values for a specific appointment instance.
26
+ * The `data` property contains key-value pairs where keys correspond to `fieldKey`
27
+ * values defined in the organization and service-level field configurations.
28
+ *
29
+ * @see AppointmentFieldConfigSchema - Organization-level field definitions
30
+ * @see ServiceAppointmentFieldConfigSchema - Service-level field customization
31
+ */
32
+ // ============================================================================
33
+ // DYNAMIC FIELD VALUE SCHEMA
34
+ // ============================================================================
35
+ /**
36
+ * Schema for dynamic field value types.
37
+ * Accepts any value type to support the various DynamicFieldType values
38
+ * (text, number, boolean, date, select options, etc.)
39
+ */
40
+ exports.DynamicFieldValueSchema = zod_1.default.any().describe("Dynamic field value supporting various types");
41
+ // ============================================================================
42
+ // APPOINTMENT ADDITIONAL INFO SCHEMA
43
+ // ============================================================================
44
+ /**
45
+ * Appointment Additional Info schema.
46
+ * Stores dynamic field values captured during appointment booking.
47
+ *
48
+ * @typedef {Object} AppointmentAdditionalInfo
49
+ * @property {string} businessServiceId - Reference to the business service
50
+ * @property {string} appointmentId - Reference to the appointment instance
51
+ * @property {string} customerId - Reference to the customer who provided info
52
+ * @property {Object} data - Key-value store of captured field values
53
+ */
54
+ exports.AppointmentAdditionalInfoSchema = base_schema_1.BaseModelSchema.safeExtend({
55
+ businessServiceId: zod_1.default.string().describe("Reference to the business service for this appointment. The service's ServiceAppointmentFieldConfigSchema determines which fields were presented to the customer."),
56
+ appointmentId: zod_1.default.string().describe("Reference to the appointment instance these field values belong to. Creates a 1:1 relationship between appointment and its additional info."),
57
+ customerId: zod_1.default.string().describe("Reference to the customer who provided this information. When reuseDetails is enabled, this allows pre-populating fields for returning customers."),
58
+ data: zod_1.default.record(zod_1.default.string(), exports.DynamicFieldValueSchema).default({}).describe("Key-value store of captured field values. Keys correspond to fieldKey from FieldDefinitionSchema. Values are typed according to the field's DynamicFieldType."),
59
+ });
60
+ // ============================================================================
61
+ // CREATE/UPDATE SCHEMAS
62
+ // ============================================================================
63
+ /**
64
+ * Schema for creating appointment additional info.
65
+ * Omits auto-generated fields.
66
+ */
67
+ exports.CreateAppointmentAdditionalInfoSchema = exports.AppointmentAdditionalInfoSchema.omit({
68
+ id: true,
69
+ createdAt: true,
70
+ updatedAt: true,
71
+ });
72
+ /**
73
+ * Schema for updating appointment additional info.
74
+ * All fields optional except id (required).
75
+ */
76
+ exports.UpdateAppointmentAdditionalInfoSchema = exports.CreateAppointmentAdditionalInfoSchema.partial().safeExtend({
77
+ id: zod_1.default.string().describe("Unique identifier of the AppointmentAdditionalInfo to update"),
78
+ });
@@ -0,0 +1,304 @@
1
+ import z from "zod";
2
+ import { BusinessSupportServices } from "../../type-definitions/account-definitions";
3
+ /**
4
+ * @fileoverview Organization-level appointment field configuration schema.
5
+ * @module business-mgt/appointment-field-config
6
+ *
7
+ * This schema represents the **Organization Level** in the dynamic fields hierarchy:
8
+ *
9
+ * ```
10
+ * Organization Level (AppointmentFieldConfigSchema) ← THIS SCHEMA
11
+ * │
12
+ * ▼ inherits via appointmentFieldConfigId
13
+ * Service Level (ServiceAppointmentFieldConfigSchema)
14
+ * │
15
+ * ▼ stores values
16
+ * Appointment Level (AppointmentAdditionalInfoSchema)
17
+ * ```
18
+ *
19
+ * Defines the base field library that can be reused across multiple services
20
+ * within an organization. Services can inherit fields from this configuration
21
+ * and optionally override specific properties or add service-specific fields.
22
+ *
23
+ * @see ServiceAppointmentFieldConfigSchema - Service-level field customization
24
+ * @see AppointmentAdditionalInfoSchema - Stores captured field values
25
+ */
26
+ /**
27
+ * Appointment Field Config schema.
28
+ * Organization-level field library for appointment booking forms.
29
+ *
30
+ * @typedef {Object} AppointmentFieldConfig
31
+ * @property {Array} fields - Field definitions available at organization level
32
+ * @property {Array} groups - Logical groupings for organizing fields
33
+ * @property {boolean} reuseDetails - Whether to reuse data for returning customers
34
+ * @property {boolean} ensureEmail - Ensure email field is always included
35
+ * @property {boolean} ensurePhone - Ensure phone field is always included
36
+ * @property {BusinessSupportServices} [supportService] - Business support service this field configuration applies to
37
+ */
38
+ export declare const AppointmentFieldConfigSchema: z.ZodObject<{
39
+ id: z.ZodString;
40
+ createdAt: z.ZodOptional<z.ZodNumber>;
41
+ updatedAt: z.ZodOptional<z.ZodNumber>;
42
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
43
+ fieldKey: z.ZodString;
44
+ fieldType: z.ZodEnum<{
45
+ text: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
46
+ textarea: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
47
+ number: import("../../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
48
+ boolean: import("../../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
49
+ date: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATE;
50
+ time: import("../../type-definitions/dynamic-fields").DynamicFieldType.TIME;
51
+ datetime: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
52
+ email: import("../../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
53
+ phone: import("../../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
54
+ select: import("../../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
55
+ multiselect: import("../../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
56
+ }>;
57
+ label: z.ZodString;
58
+ description: z.ZodOptional<z.ZodString>;
59
+ validation: z.ZodOptional<z.ZodObject<{
60
+ required: z.ZodOptional<z.ZodBoolean>;
61
+ minLength: z.ZodOptional<z.ZodNumber>;
62
+ maxLength: z.ZodOptional<z.ZodNumber>;
63
+ min: z.ZodOptional<z.ZodNumber>;
64
+ max: z.ZodOptional<z.ZodNumber>;
65
+ pattern: z.ZodOptional<z.ZodString>;
66
+ patternMessage: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>>;
68
+ uiHints: z.ZodOptional<z.ZodObject<{
69
+ placeholder: z.ZodOptional<z.ZodString>;
70
+ helpText: z.ZodOptional<z.ZodString>;
71
+ displayOrder: z.ZodOptional<z.ZodNumber>;
72
+ width: z.ZodOptional<z.ZodEnum<{
73
+ full: "full";
74
+ half: "half";
75
+ third: "third";
76
+ }>>;
77
+ }, z.core.$strip>>;
78
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
+ value: z.ZodString;
80
+ label: z.ZodString;
81
+ displayOrder: z.ZodOptional<z.ZodNumber>;
82
+ }, z.core.$strip>>>;
83
+ defaultValue: z.ZodOptional<z.ZodAny>;
84
+ isActive: z.ZodOptional<z.ZodBoolean>;
85
+ condition: z.ZodOptional<z.ZodObject<{
86
+ dependsOn: z.ZodString;
87
+ operator: z.ZodEnum<{
88
+ equals: "equals";
89
+ notEquals: "notEquals";
90
+ contains: "contains";
91
+ isEmpty: "isEmpty";
92
+ isNotEmpty: "isNotEmpty";
93
+ greaterThan: "greaterThan";
94
+ lessThan: "lessThan";
95
+ }>;
96
+ value: z.ZodOptional<z.ZodAny>;
97
+ }, z.core.$strip>>;
98
+ groupKey: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>>>;
100
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
101
+ groupKey: z.ZodString;
102
+ label: z.ZodString;
103
+ description: z.ZodOptional<z.ZodString>;
104
+ displayOrder: z.ZodOptional<z.ZodNumber>;
105
+ collapsible: z.ZodOptional<z.ZodBoolean>;
106
+ defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
107
+ }, z.core.$strip>>>;
108
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
109
+ ensureEmail: z.ZodDefault<z.ZodBoolean>;
110
+ ensurePhone: z.ZodDefault<z.ZodBoolean>;
111
+ supportService: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof BusinessSupportServices>>>;
112
+ }, z.core.$strip>;
113
+ /**
114
+ * Schema for creating an appointment field config.
115
+ * Omits auto-generated fields.
116
+ */
117
+ export declare const CreateAppointmentFieldConfigSchema: z.ZodObject<{
118
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
119
+ fieldKey: z.ZodString;
120
+ fieldType: z.ZodEnum<{
121
+ text: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
122
+ textarea: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
123
+ number: import("../../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
124
+ boolean: import("../../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
125
+ date: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATE;
126
+ time: import("../../type-definitions/dynamic-fields").DynamicFieldType.TIME;
127
+ datetime: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
128
+ email: import("../../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
129
+ phone: import("../../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
130
+ select: import("../../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
131
+ multiselect: import("../../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
132
+ }>;
133
+ label: z.ZodString;
134
+ description: z.ZodOptional<z.ZodString>;
135
+ validation: z.ZodOptional<z.ZodObject<{
136
+ required: z.ZodOptional<z.ZodBoolean>;
137
+ minLength: z.ZodOptional<z.ZodNumber>;
138
+ maxLength: z.ZodOptional<z.ZodNumber>;
139
+ min: z.ZodOptional<z.ZodNumber>;
140
+ max: z.ZodOptional<z.ZodNumber>;
141
+ pattern: z.ZodOptional<z.ZodString>;
142
+ patternMessage: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strip>>;
144
+ uiHints: z.ZodOptional<z.ZodObject<{
145
+ placeholder: z.ZodOptional<z.ZodString>;
146
+ helpText: z.ZodOptional<z.ZodString>;
147
+ displayOrder: z.ZodOptional<z.ZodNumber>;
148
+ width: z.ZodOptional<z.ZodEnum<{
149
+ full: "full";
150
+ half: "half";
151
+ third: "third";
152
+ }>>;
153
+ }, z.core.$strip>>;
154
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
155
+ value: z.ZodString;
156
+ label: z.ZodString;
157
+ displayOrder: z.ZodOptional<z.ZodNumber>;
158
+ }, z.core.$strip>>>;
159
+ defaultValue: z.ZodOptional<z.ZodAny>;
160
+ isActive: z.ZodOptional<z.ZodBoolean>;
161
+ condition: z.ZodOptional<z.ZodObject<{
162
+ dependsOn: z.ZodString;
163
+ operator: z.ZodEnum<{
164
+ equals: "equals";
165
+ notEquals: "notEquals";
166
+ contains: "contains";
167
+ isEmpty: "isEmpty";
168
+ isNotEmpty: "isNotEmpty";
169
+ greaterThan: "greaterThan";
170
+ lessThan: "lessThan";
171
+ }>;
172
+ value: z.ZodOptional<z.ZodAny>;
173
+ }, z.core.$strip>>;
174
+ groupKey: z.ZodOptional<z.ZodString>;
175
+ }, z.core.$strip>>>;
176
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
177
+ groupKey: z.ZodString;
178
+ label: z.ZodString;
179
+ description: z.ZodOptional<z.ZodString>;
180
+ displayOrder: z.ZodOptional<z.ZodNumber>;
181
+ collapsible: z.ZodOptional<z.ZodBoolean>;
182
+ defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
183
+ }, z.core.$strip>>>;
184
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
185
+ ensureEmail: z.ZodDefault<z.ZodBoolean>;
186
+ ensurePhone: z.ZodDefault<z.ZodBoolean>;
187
+ supportService: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof BusinessSupportServices>>>;
188
+ }, z.core.$strip>;
189
+ /**
190
+ * Schema for updating an appointment field config.
191
+ * All fields optional except id (required).
192
+ */
193
+ export declare const UpdateAppointmentFieldConfigSchema: z.ZodObject<{
194
+ fields: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
195
+ fieldKey: z.ZodString;
196
+ fieldType: z.ZodEnum<{
197
+ text: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
198
+ textarea: import("../../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
199
+ number: import("../../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
200
+ boolean: import("../../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
201
+ date: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATE;
202
+ time: import("../../type-definitions/dynamic-fields").DynamicFieldType.TIME;
203
+ datetime: import("../../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
204
+ email: import("../../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
205
+ phone: import("../../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
206
+ select: import("../../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
207
+ multiselect: import("../../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
208
+ }>;
209
+ label: z.ZodString;
210
+ description: z.ZodOptional<z.ZodString>;
211
+ validation: z.ZodOptional<z.ZodObject<{
212
+ required: z.ZodOptional<z.ZodBoolean>;
213
+ minLength: z.ZodOptional<z.ZodNumber>;
214
+ maxLength: z.ZodOptional<z.ZodNumber>;
215
+ min: z.ZodOptional<z.ZodNumber>;
216
+ max: z.ZodOptional<z.ZodNumber>;
217
+ pattern: z.ZodOptional<z.ZodString>;
218
+ patternMessage: z.ZodOptional<z.ZodString>;
219
+ }, z.core.$strip>>;
220
+ uiHints: z.ZodOptional<z.ZodObject<{
221
+ placeholder: z.ZodOptional<z.ZodString>;
222
+ helpText: z.ZodOptional<z.ZodString>;
223
+ displayOrder: z.ZodOptional<z.ZodNumber>;
224
+ width: z.ZodOptional<z.ZodEnum<{
225
+ full: "full";
226
+ half: "half";
227
+ third: "third";
228
+ }>>;
229
+ }, z.core.$strip>>;
230
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
231
+ value: z.ZodString;
232
+ label: z.ZodString;
233
+ displayOrder: z.ZodOptional<z.ZodNumber>;
234
+ }, z.core.$strip>>>;
235
+ defaultValue: z.ZodOptional<z.ZodAny>;
236
+ isActive: z.ZodOptional<z.ZodBoolean>;
237
+ condition: z.ZodOptional<z.ZodObject<{
238
+ dependsOn: z.ZodString;
239
+ operator: z.ZodEnum<{
240
+ equals: "equals";
241
+ notEquals: "notEquals";
242
+ contains: "contains";
243
+ isEmpty: "isEmpty";
244
+ isNotEmpty: "isNotEmpty";
245
+ greaterThan: "greaterThan";
246
+ lessThan: "lessThan";
247
+ }>;
248
+ value: z.ZodOptional<z.ZodAny>;
249
+ }, z.core.$strip>>;
250
+ groupKey: z.ZodOptional<z.ZodString>;
251
+ }, z.core.$strip>>>>;
252
+ groups: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
253
+ groupKey: z.ZodString;
254
+ label: z.ZodString;
255
+ description: z.ZodOptional<z.ZodString>;
256
+ displayOrder: z.ZodOptional<z.ZodNumber>;
257
+ collapsible: z.ZodOptional<z.ZodBoolean>;
258
+ defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
259
+ }, z.core.$strip>>>>;
260
+ reuseDetails: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
261
+ ensureEmail: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
262
+ ensurePhone: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
263
+ supportService: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof BusinessSupportServices>>>>;
264
+ id: z.ZodString;
265
+ }, z.core.$strip>;
266
+ export type AppointmentFieldConfig = z.infer<typeof AppointmentFieldConfigSchema>;
267
+ export type CreateAppointmentFieldConfig = z.infer<typeof CreateAppointmentFieldConfigSchema>;
268
+ export type UpdateAppointmentFieldConfig = z.infer<typeof UpdateAppointmentFieldConfigSchema>;
269
+ /**
270
+ * Appointment field config filter options.
271
+ * @interface AppointmentFieldConfigFilters
272
+ */
273
+ export interface AppointmentFieldConfigFilters {
274
+ /** Filter by reuseDetails setting */
275
+ reuseDetails?: boolean;
276
+ /** Filter by ensureEmail setting */
277
+ ensureEmail?: boolean;
278
+ /** Filter by ensurePhone setting */
279
+ ensurePhone?: boolean;
280
+ }
281
+ /**
282
+ * Appointment field config sorting options.
283
+ * @interface AppointmentFieldConfigSorting
284
+ */
285
+ export interface AppointmentFieldConfigSorting {
286
+ /** Field to sort by */
287
+ field: "createdAt" | "updatedAt";
288
+ /** Sort direction */
289
+ direction: "asc" | "desc";
290
+ }
291
+ /**
292
+ * Appointment field config query options.
293
+ * @interface AppointmentFieldConfigQueryOptions
294
+ */
295
+ export interface AppointmentFieldConfigQueryOptions {
296
+ /** Page number (1-indexed) */
297
+ page: number;
298
+ /** Items per page */
299
+ pageSize: number;
300
+ /** Optional filters */
301
+ filters?: AppointmentFieldConfigFilters;
302
+ /** Optional sorting */
303
+ sorting?: AppointmentFieldConfigSorting;
304
+ }
@@ -0,0 +1,75 @@
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.UpdateAppointmentFieldConfigSchema = exports.CreateAppointmentFieldConfigSchema = exports.AppointmentFieldConfigSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const base_schema_1 = require("../../base.schema");
9
+ const dynamic_fields_1 = require("../../type-definitions/dynamic-fields");
10
+ const account_definitions_1 = require("../../type-definitions/account-definitions");
11
+ /**
12
+ * @fileoverview Organization-level appointment field configuration schema.
13
+ * @module business-mgt/appointment-field-config
14
+ *
15
+ * This schema represents the **Organization Level** in the dynamic fields hierarchy:
16
+ *
17
+ * ```
18
+ * Organization Level (AppointmentFieldConfigSchema) ← THIS SCHEMA
19
+ * │
20
+ * ▼ inherits via appointmentFieldConfigId
21
+ * Service Level (ServiceAppointmentFieldConfigSchema)
22
+ * │
23
+ * ▼ stores values
24
+ * Appointment Level (AppointmentAdditionalInfoSchema)
25
+ * ```
26
+ *
27
+ * Defines the base field library that can be reused across multiple services
28
+ * within an organization. Services can inherit fields from this configuration
29
+ * and optionally override specific properties or add service-specific fields.
30
+ *
31
+ * @see ServiceAppointmentFieldConfigSchema - Service-level field customization
32
+ * @see AppointmentAdditionalInfoSchema - Stores captured field values
33
+ */
34
+ // ============================================================================
35
+ // APPOINTMENT FIELD CONFIG SCHEMA
36
+ // ============================================================================
37
+ /**
38
+ * Appointment Field Config schema.
39
+ * Organization-level field library for appointment booking forms.
40
+ *
41
+ * @typedef {Object} AppointmentFieldConfig
42
+ * @property {Array} fields - Field definitions available at organization level
43
+ * @property {Array} groups - Logical groupings for organizing fields
44
+ * @property {boolean} reuseDetails - Whether to reuse data for returning customers
45
+ * @property {boolean} ensureEmail - Ensure email field is always included
46
+ * @property {boolean} ensurePhone - Ensure phone field is always included
47
+ * @property {BusinessSupportServices} [supportService] - Business support service this field configuration applies to
48
+ */
49
+ exports.AppointmentFieldConfigSchema = base_schema_1.BaseModelSchema.safeExtend({
50
+ fields: zod_1.default.array(dynamic_fields_1.FieldDefinitionSchema).default([]).describe("Array of field definitions available at the organization level. Each field has a unique fieldKey, fieldType, label, and optional validation/UI hints."),
51
+ groups: zod_1.default.array(dynamic_fields_1.FieldGroupSchema).default([]).describe("Logical groupings for organizing fields into sections (e.g., 'Contact Information', 'Medical History'). Each group has a groupKey, label, and optional display settings."),
52
+ reuseDetails: zod_1.default.boolean().default(false).describe("When true, captured field data can be reused across appointments for the same customer."),
53
+ ensureEmail: zod_1.default.boolean().default(false).describe("When true, ensures an email field is always included in the field configuration."),
54
+ ensurePhone: zod_1.default.boolean().default(false).describe("When true, ensures a phone field is always included in the field configuration."),
55
+ supportService: zod_1.default.enum(account_definitions_1.BusinessSupportServices).nullable().optional().describe("Business support service this field configuration applies to (e.g., appointment management)."),
56
+ });
57
+ // ============================================================================
58
+ // CREATE/UPDATE SCHEMAS
59
+ // ============================================================================
60
+ /**
61
+ * Schema for creating an appointment field config.
62
+ * Omits auto-generated fields.
63
+ */
64
+ exports.CreateAppointmentFieldConfigSchema = exports.AppointmentFieldConfigSchema.omit({
65
+ id: true,
66
+ createdAt: true,
67
+ updatedAt: true,
68
+ });
69
+ /**
70
+ * Schema for updating an appointment field config.
71
+ * All fields optional except id (required).
72
+ */
73
+ exports.UpdateAppointmentFieldConfigSchema = exports.CreateAppointmentFieldConfigSchema.partial().safeExtend({
74
+ id: zod_1.default.string().describe("Unique identifier of the AppointmentFieldConfig to update"),
75
+ });