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,453 @@
1
+ import z from "zod";
2
+ /**
3
+ * @fileoverview Business service configuration schema definitions.
4
+ * @module business-mgt/business-service-config
5
+ */
6
+ /**
7
+ * Service-level appointment field configuration (embedded in BusinessServiceConfigSchema).
8
+ *
9
+ * This schema represents the **Service Level** in the dynamic fields hierarchy:
10
+ *
11
+ * ```
12
+ * Organization Level (AppointmentFieldConfigSchema)
13
+ * │
14
+ * ▼ inherits via appointmentFieldConfigId
15
+ * Service Level (ServiceAppointmentFieldConfigSchema) ← THIS SCHEMA
16
+ * │
17
+ * ▼ stores values
18
+ * Appointment Level (AppointmentAdditionalInfoSchema)
19
+ * ```
20
+ *
21
+ * Allows services to:
22
+ * - Inherit specific fields from the organization-level configuration
23
+ * - Override properties of inherited fields (e.g., make a field required)
24
+ * - Add service-specific fields not in the organization config
25
+ *
26
+ * @see AppointmentFieldConfigSchema - Organization-level field definitions
27
+ * @see AppointmentAdditionalInfoSchema - Stores captured field values
28
+ */
29
+ export declare const ServiceAppointmentFieldConfigSchema: z.ZodObject<{
30
+ inheritedFieldKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
31
+ fieldOverrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
32
+ fieldKey: z.ZodString;
33
+ label: z.ZodOptional<z.ZodString>;
34
+ validation: z.ZodOptional<z.ZodObject<{
35
+ required: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
36
+ minLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
37
+ maxLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
38
+ min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
39
+ max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
40
+ pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
41
+ patternMessage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
42
+ }, z.core.$strip>>;
43
+ uiHints: z.ZodOptional<z.ZodObject<{
44
+ placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
45
+ helpText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
46
+ displayOrder: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
47
+ width: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
48
+ full: "full";
49
+ half: "half";
50
+ third: "third";
51
+ }>>>;
52
+ }, z.core.$strip>>;
53
+ defaultValue: z.ZodOptional<z.ZodAny>;
54
+ isActive: z.ZodOptional<z.ZodBoolean>;
55
+ }, z.core.$strip>>>;
56
+ additionalFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
57
+ fieldKey: z.ZodString;
58
+ fieldType: z.ZodEnum<{
59
+ text: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
60
+ textarea: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
61
+ number: import("../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
62
+ boolean: import("../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
63
+ date: import("../type-definitions/dynamic-fields").DynamicFieldType.DATE;
64
+ time: import("../type-definitions/dynamic-fields").DynamicFieldType.TIME;
65
+ datetime: import("../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
66
+ email: import("../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
67
+ phone: import("../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
68
+ select: import("../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
69
+ multiselect: import("../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
70
+ }>;
71
+ label: z.ZodString;
72
+ description: z.ZodOptional<z.ZodString>;
73
+ validation: z.ZodOptional<z.ZodObject<{
74
+ required: z.ZodOptional<z.ZodBoolean>;
75
+ minLength: z.ZodOptional<z.ZodNumber>;
76
+ maxLength: z.ZodOptional<z.ZodNumber>;
77
+ min: z.ZodOptional<z.ZodNumber>;
78
+ max: z.ZodOptional<z.ZodNumber>;
79
+ pattern: z.ZodOptional<z.ZodString>;
80
+ patternMessage: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strip>>;
82
+ uiHints: z.ZodOptional<z.ZodObject<{
83
+ placeholder: z.ZodOptional<z.ZodString>;
84
+ helpText: z.ZodOptional<z.ZodString>;
85
+ displayOrder: z.ZodOptional<z.ZodNumber>;
86
+ width: z.ZodOptional<z.ZodEnum<{
87
+ full: "full";
88
+ half: "half";
89
+ third: "third";
90
+ }>>;
91
+ }, z.core.$strip>>;
92
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
+ value: z.ZodString;
94
+ label: z.ZodString;
95
+ displayOrder: z.ZodOptional<z.ZodNumber>;
96
+ }, z.core.$strip>>>;
97
+ defaultValue: z.ZodOptional<z.ZodAny>;
98
+ isActive: z.ZodOptional<z.ZodBoolean>;
99
+ condition: z.ZodOptional<z.ZodObject<{
100
+ dependsOn: z.ZodString;
101
+ operator: z.ZodEnum<{
102
+ equals: "equals";
103
+ notEquals: "notEquals";
104
+ contains: "contains";
105
+ isEmpty: "isEmpty";
106
+ isNotEmpty: "isNotEmpty";
107
+ greaterThan: "greaterThan";
108
+ lessThan: "lessThan";
109
+ }>;
110
+ value: z.ZodOptional<z.ZodAny>;
111
+ }, z.core.$strip>>;
112
+ groupKey: z.ZodOptional<z.ZodString>;
113
+ }, z.core.$strip>>>;
114
+ isActive: z.ZodDefault<z.ZodBoolean>;
115
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
116
+ }, z.core.$strip>;
117
+ export type ServiceAppointmentFieldConfig = z.infer<typeof ServiceAppointmentFieldConfigSchema>;
118
+ /**
119
+ * Business service configuration schema.
120
+ *
121
+ * @typedef {Object} BusinessServiceConfig
122
+ * @property {string} id - Unique identifier for the service
123
+ * @property {string} name - Name of the service offered
124
+ * @property {string} [description] - Detailed description of the service
125
+ * @property {number} duration - Service duration in minutes (max 8 hours)
126
+ * @property {number} bufferTime - Buffer time between appointments in minutes
127
+ * @property {boolean} isBookable - Whether this service can be booked online
128
+ * @property {number} [price] - Service price in account currency
129
+ * @property {boolean} isActive - Whether the service is currently available
130
+
131
+ */
132
+ export declare const BusinessServiceConfigSchema: z.ZodObject<{
133
+ id: z.ZodString;
134
+ createdAt: z.ZodOptional<z.ZodNumber>;
135
+ updatedAt: z.ZodOptional<z.ZodNumber>;
136
+ name: z.ZodString;
137
+ description: z.ZodString;
138
+ duration: z.ZodDefault<z.ZodNumber>;
139
+ bufferTime: z.ZodDefault<z.ZodNumber>;
140
+ isBookable: z.ZodDefault<z.ZodBoolean>;
141
+ price: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
142
+ isActive: z.ZodDefault<z.ZodBoolean>;
143
+ requiredDatafieldConfig: z.ZodOptional<z.ZodObject<{
144
+ inheritedFieldKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
145
+ fieldOverrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
146
+ fieldKey: z.ZodString;
147
+ label: z.ZodOptional<z.ZodString>;
148
+ validation: z.ZodOptional<z.ZodObject<{
149
+ required: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
150
+ minLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
151
+ maxLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
152
+ min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
153
+ max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
154
+ pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
155
+ patternMessage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
156
+ }, z.core.$strip>>;
157
+ uiHints: z.ZodOptional<z.ZodObject<{
158
+ placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
159
+ helpText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
160
+ displayOrder: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
161
+ width: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
162
+ full: "full";
163
+ half: "half";
164
+ third: "third";
165
+ }>>>;
166
+ }, z.core.$strip>>;
167
+ defaultValue: z.ZodOptional<z.ZodAny>;
168
+ isActive: z.ZodOptional<z.ZodBoolean>;
169
+ }, z.core.$strip>>>;
170
+ additionalFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
171
+ fieldKey: z.ZodString;
172
+ fieldType: z.ZodEnum<{
173
+ text: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
174
+ textarea: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
175
+ number: import("../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
176
+ boolean: import("../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
177
+ date: import("../type-definitions/dynamic-fields").DynamicFieldType.DATE;
178
+ time: import("../type-definitions/dynamic-fields").DynamicFieldType.TIME;
179
+ datetime: import("../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
180
+ email: import("../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
181
+ phone: import("../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
182
+ select: import("../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
183
+ multiselect: import("../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
184
+ }>;
185
+ label: z.ZodString;
186
+ description: z.ZodOptional<z.ZodString>;
187
+ validation: z.ZodOptional<z.ZodObject<{
188
+ required: z.ZodOptional<z.ZodBoolean>;
189
+ minLength: z.ZodOptional<z.ZodNumber>;
190
+ maxLength: z.ZodOptional<z.ZodNumber>;
191
+ min: z.ZodOptional<z.ZodNumber>;
192
+ max: z.ZodOptional<z.ZodNumber>;
193
+ pattern: z.ZodOptional<z.ZodString>;
194
+ patternMessage: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>>;
196
+ uiHints: z.ZodOptional<z.ZodObject<{
197
+ placeholder: z.ZodOptional<z.ZodString>;
198
+ helpText: z.ZodOptional<z.ZodString>;
199
+ displayOrder: z.ZodOptional<z.ZodNumber>;
200
+ width: z.ZodOptional<z.ZodEnum<{
201
+ full: "full";
202
+ half: "half";
203
+ third: "third";
204
+ }>>;
205
+ }, z.core.$strip>>;
206
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
+ value: z.ZodString;
208
+ label: z.ZodString;
209
+ displayOrder: z.ZodOptional<z.ZodNumber>;
210
+ }, z.core.$strip>>>;
211
+ defaultValue: z.ZodOptional<z.ZodAny>;
212
+ isActive: z.ZodOptional<z.ZodBoolean>;
213
+ condition: z.ZodOptional<z.ZodObject<{
214
+ dependsOn: z.ZodString;
215
+ operator: z.ZodEnum<{
216
+ equals: "equals";
217
+ notEquals: "notEquals";
218
+ contains: "contains";
219
+ isEmpty: "isEmpty";
220
+ isNotEmpty: "isNotEmpty";
221
+ greaterThan: "greaterThan";
222
+ lessThan: "lessThan";
223
+ }>;
224
+ value: z.ZodOptional<z.ZodAny>;
225
+ }, z.core.$strip>>;
226
+ groupKey: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strip>>>;
228
+ isActive: z.ZodDefault<z.ZodBoolean>;
229
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
230
+ }, z.core.$strip>>;
231
+ }, z.core.$strip>;
232
+ /**
233
+ * Service QR code schema for appointment booking.
234
+ *
235
+ * @typedef {Object} ServiceQRCode
236
+ * @property {string} id - Unique identifier for the QR code
237
+ * @property {string} appointmentUrl - Direct link to the appointment page
238
+ * @property {string} [qrCodeImage] - Base64 encoded QR code image
239
+ * @property {string} [serviceId] - Specific service ID for direct appointment
240
+ */
241
+ export declare const ServiceQRCodeSchema: z.ZodObject<{
242
+ id: z.ZodString;
243
+ appointmentUrl: z.ZodString;
244
+ qrCodeImage: z.ZodOptional<z.ZodString>;
245
+ serviceId: z.ZodOptional<z.ZodString>;
246
+ }, z.core.$strip>;
247
+ /**
248
+ * Schema for creating a new business service.
249
+ * Omits auto-generated fields.
250
+ */
251
+ export declare const CreateBusinessServiceSchema: z.ZodObject<{
252
+ name: z.ZodString;
253
+ description: z.ZodString;
254
+ isActive: z.ZodDefault<z.ZodBoolean>;
255
+ price: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
256
+ duration: z.ZodDefault<z.ZodNumber>;
257
+ bufferTime: z.ZodDefault<z.ZodNumber>;
258
+ isBookable: z.ZodDefault<z.ZodBoolean>;
259
+ requiredDatafieldConfig: z.ZodOptional<z.ZodObject<{
260
+ inheritedFieldKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
261
+ fieldOverrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
262
+ fieldKey: z.ZodString;
263
+ label: z.ZodOptional<z.ZodString>;
264
+ validation: z.ZodOptional<z.ZodObject<{
265
+ required: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
266
+ minLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
267
+ maxLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
268
+ min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
269
+ max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
270
+ pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
271
+ patternMessage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
272
+ }, z.core.$strip>>;
273
+ uiHints: z.ZodOptional<z.ZodObject<{
274
+ placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
275
+ helpText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
276
+ displayOrder: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
277
+ width: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
278
+ full: "full";
279
+ half: "half";
280
+ third: "third";
281
+ }>>>;
282
+ }, z.core.$strip>>;
283
+ defaultValue: z.ZodOptional<z.ZodAny>;
284
+ isActive: z.ZodOptional<z.ZodBoolean>;
285
+ }, z.core.$strip>>>;
286
+ additionalFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
287
+ fieldKey: z.ZodString;
288
+ fieldType: z.ZodEnum<{
289
+ text: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
290
+ textarea: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
291
+ number: import("../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
292
+ boolean: import("../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
293
+ date: import("../type-definitions/dynamic-fields").DynamicFieldType.DATE;
294
+ time: import("../type-definitions/dynamic-fields").DynamicFieldType.TIME;
295
+ datetime: import("../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
296
+ email: import("../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
297
+ phone: import("../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
298
+ select: import("../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
299
+ multiselect: import("../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
300
+ }>;
301
+ label: z.ZodString;
302
+ description: z.ZodOptional<z.ZodString>;
303
+ validation: z.ZodOptional<z.ZodObject<{
304
+ required: z.ZodOptional<z.ZodBoolean>;
305
+ minLength: z.ZodOptional<z.ZodNumber>;
306
+ maxLength: z.ZodOptional<z.ZodNumber>;
307
+ min: z.ZodOptional<z.ZodNumber>;
308
+ max: z.ZodOptional<z.ZodNumber>;
309
+ pattern: z.ZodOptional<z.ZodString>;
310
+ patternMessage: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strip>>;
312
+ uiHints: z.ZodOptional<z.ZodObject<{
313
+ placeholder: z.ZodOptional<z.ZodString>;
314
+ helpText: z.ZodOptional<z.ZodString>;
315
+ displayOrder: z.ZodOptional<z.ZodNumber>;
316
+ width: z.ZodOptional<z.ZodEnum<{
317
+ full: "full";
318
+ half: "half";
319
+ third: "third";
320
+ }>>;
321
+ }, z.core.$strip>>;
322
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
323
+ value: z.ZodString;
324
+ label: z.ZodString;
325
+ displayOrder: z.ZodOptional<z.ZodNumber>;
326
+ }, z.core.$strip>>>;
327
+ defaultValue: z.ZodOptional<z.ZodAny>;
328
+ isActive: z.ZodOptional<z.ZodBoolean>;
329
+ condition: z.ZodOptional<z.ZodObject<{
330
+ dependsOn: z.ZodString;
331
+ operator: z.ZodEnum<{
332
+ equals: "equals";
333
+ notEquals: "notEquals";
334
+ contains: "contains";
335
+ isEmpty: "isEmpty";
336
+ isNotEmpty: "isNotEmpty";
337
+ greaterThan: "greaterThan";
338
+ lessThan: "lessThan";
339
+ }>;
340
+ value: z.ZodOptional<z.ZodAny>;
341
+ }, z.core.$strip>>;
342
+ groupKey: z.ZodOptional<z.ZodString>;
343
+ }, z.core.$strip>>>;
344
+ isActive: z.ZodDefault<z.ZodBoolean>;
345
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
346
+ }, z.core.$strip>>;
347
+ }, z.core.$strip>;
348
+ /**
349
+ * Schema for updating an existing business service.
350
+ * All fields are optional except id.
351
+ */
352
+ export declare const UpdateBusinessServiceSchema: z.ZodObject<{
353
+ name: z.ZodOptional<z.ZodString>;
354
+ description: z.ZodOptional<z.ZodString>;
355
+ isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
356
+ price: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodNumber>>>;
357
+ duration: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
358
+ bufferTime: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
359
+ isBookable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
360
+ requiredDatafieldConfig: z.ZodOptional<z.ZodOptional<z.ZodObject<{
361
+ inheritedFieldKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
362
+ fieldOverrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
363
+ fieldKey: z.ZodString;
364
+ label: z.ZodOptional<z.ZodString>;
365
+ validation: z.ZodOptional<z.ZodObject<{
366
+ required: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
367
+ minLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
368
+ maxLength: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
369
+ min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
370
+ max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
371
+ pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
372
+ patternMessage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
373
+ }, z.core.$strip>>;
374
+ uiHints: z.ZodOptional<z.ZodObject<{
375
+ placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
376
+ helpText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
377
+ displayOrder: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
378
+ width: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
379
+ full: "full";
380
+ half: "half";
381
+ third: "third";
382
+ }>>>;
383
+ }, z.core.$strip>>;
384
+ defaultValue: z.ZodOptional<z.ZodAny>;
385
+ isActive: z.ZodOptional<z.ZodBoolean>;
386
+ }, z.core.$strip>>>;
387
+ additionalFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
388
+ fieldKey: z.ZodString;
389
+ fieldType: z.ZodEnum<{
390
+ text: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXT;
391
+ textarea: import("../type-definitions/dynamic-fields").DynamicFieldType.TEXTAREA;
392
+ number: import("../type-definitions/dynamic-fields").DynamicFieldType.NUMBER;
393
+ boolean: import("../type-definitions/dynamic-fields").DynamicFieldType.BOOLEAN;
394
+ date: import("../type-definitions/dynamic-fields").DynamicFieldType.DATE;
395
+ time: import("../type-definitions/dynamic-fields").DynamicFieldType.TIME;
396
+ datetime: import("../type-definitions/dynamic-fields").DynamicFieldType.DATETIME;
397
+ email: import("../type-definitions/dynamic-fields").DynamicFieldType.EMAIL;
398
+ phone: import("../type-definitions/dynamic-fields").DynamicFieldType.PHONE;
399
+ select: import("../type-definitions/dynamic-fields").DynamicFieldType.SELECT;
400
+ multiselect: import("../type-definitions/dynamic-fields").DynamicFieldType.MULTISELECT;
401
+ }>;
402
+ label: z.ZodString;
403
+ description: z.ZodOptional<z.ZodString>;
404
+ validation: z.ZodOptional<z.ZodObject<{
405
+ required: z.ZodOptional<z.ZodBoolean>;
406
+ minLength: z.ZodOptional<z.ZodNumber>;
407
+ maxLength: z.ZodOptional<z.ZodNumber>;
408
+ min: z.ZodOptional<z.ZodNumber>;
409
+ max: z.ZodOptional<z.ZodNumber>;
410
+ pattern: z.ZodOptional<z.ZodString>;
411
+ patternMessage: z.ZodOptional<z.ZodString>;
412
+ }, z.core.$strip>>;
413
+ uiHints: z.ZodOptional<z.ZodObject<{
414
+ placeholder: z.ZodOptional<z.ZodString>;
415
+ helpText: z.ZodOptional<z.ZodString>;
416
+ displayOrder: z.ZodOptional<z.ZodNumber>;
417
+ width: z.ZodOptional<z.ZodEnum<{
418
+ full: "full";
419
+ half: "half";
420
+ third: "third";
421
+ }>>;
422
+ }, z.core.$strip>>;
423
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
424
+ value: z.ZodString;
425
+ label: z.ZodString;
426
+ displayOrder: z.ZodOptional<z.ZodNumber>;
427
+ }, z.core.$strip>>>;
428
+ defaultValue: z.ZodOptional<z.ZodAny>;
429
+ isActive: z.ZodOptional<z.ZodBoolean>;
430
+ condition: z.ZodOptional<z.ZodObject<{
431
+ dependsOn: z.ZodString;
432
+ operator: z.ZodEnum<{
433
+ equals: "equals";
434
+ notEquals: "notEquals";
435
+ contains: "contains";
436
+ isEmpty: "isEmpty";
437
+ isNotEmpty: "isNotEmpty";
438
+ greaterThan: "greaterThan";
439
+ lessThan: "lessThan";
440
+ }>;
441
+ value: z.ZodOptional<z.ZodAny>;
442
+ }, z.core.$strip>>;
443
+ groupKey: z.ZodOptional<z.ZodString>;
444
+ }, z.core.$strip>>>;
445
+ isActive: z.ZodDefault<z.ZodBoolean>;
446
+ reuseDetails: z.ZodDefault<z.ZodBoolean>;
447
+ }, z.core.$strip>>>;
448
+ id: z.ZodString;
449
+ }, z.core.$strip>;
450
+ export type BusinessService = z.infer<typeof BusinessServiceConfigSchema>;
451
+ export type ServiceQRCode = z.infer<typeof ServiceQRCodeSchema>;
452
+ export type CreateBusinessService = z.infer<typeof CreateBusinessServiceSchema>;
453
+ export type UpdateBusinessService = z.infer<typeof UpdateBusinessServiceSchema>;
@@ -0,0 +1,102 @@
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.UpdateBusinessServiceSchema = exports.CreateBusinessServiceSchema = exports.ServiceQRCodeSchema = exports.BusinessServiceConfigSchema = exports.ServiceAppointmentFieldConfigSchema = 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
+ /**
11
+ * @fileoverview Business service configuration schema definitions.
12
+ * @module business-mgt/business-service-config
13
+ */
14
+ /**
15
+ * Service-level appointment field configuration (embedded in BusinessServiceConfigSchema).
16
+ *
17
+ * This schema represents the **Service Level** in the dynamic fields hierarchy:
18
+ *
19
+ * ```
20
+ * Organization Level (AppointmentFieldConfigSchema)
21
+ * │
22
+ * ▼ inherits via appointmentFieldConfigId
23
+ * Service Level (ServiceAppointmentFieldConfigSchema) ← THIS SCHEMA
24
+ * │
25
+ * ▼ stores values
26
+ * Appointment Level (AppointmentAdditionalInfoSchema)
27
+ * ```
28
+ *
29
+ * Allows services to:
30
+ * - Inherit specific fields from the organization-level configuration
31
+ * - Override properties of inherited fields (e.g., make a field required)
32
+ * - Add service-specific fields not in the organization config
33
+ *
34
+ * @see AppointmentFieldConfigSchema - Organization-level field definitions
35
+ * @see AppointmentAdditionalInfoSchema - Stores captured field values
36
+ */
37
+ exports.ServiceAppointmentFieldConfigSchema = zod_1.default.object({
38
+ inheritedFieldKeys: zod_1.default.array(zod_1.default.string()).default([]).describe("Array of fieldKey values to inherit from the organization-level AppointmentFieldConfigSchema. Only fields with matching fieldKey values are included for this service. Example: ['allergies', 'emergency_contact'] inherits those two fields from the org config."),
39
+ fieldOverrides: zod_1.default.array(dynamic_fields_1.FieldOverrideSchema).default([]).describe("Array of field overrides to customize inherited fields for this service. Each override specifies a fieldKey and the properties to override (label, validation, uiHints, defaultValue, isActive). Example: Override 'allergies' field to make validation.required=true for this service."),
40
+ additionalFields: zod_1.default.array(dynamic_fields_1.FieldDefinitionSchema).default([]).describe("Array of service-specific field definitions not present in the organization config. These fields are only available for this particular service. Example: A spa service might add 'preferred_pressure' field with SELECT options."),
41
+ isActive: zod_1.default.boolean().default(true).describe("Controls whether this field configuration is active for the service. When false, no additional fields are collected during appointment booking. Defaults to true."),
42
+ reuseDetails: zod_1.default.boolean().default(false).describe("When true, captured field data for this service can be reused across appointments for the same customer. Overrides the organization-level reuseDetails setting when specified."),
43
+ });
44
+ /**
45
+ * Business service configuration schema.
46
+ *
47
+ * @typedef {Object} BusinessServiceConfig
48
+ * @property {string} id - Unique identifier for the service
49
+ * @property {string} name - Name of the service offered
50
+ * @property {string} [description] - Detailed description of the service
51
+ * @property {number} duration - Service duration in minutes (max 8 hours)
52
+ * @property {number} bufferTime - Buffer time between appointments in minutes
53
+ * @property {boolean} isBookable - Whether this service can be booked online
54
+ * @property {number} [price] - Service price in account currency
55
+ * @property {boolean} isActive - Whether the service is currently available
56
+
57
+ */
58
+ exports.BusinessServiceConfigSchema = base_schema_1.BaseModelSchema.safeExtend({
59
+ name: zod_1.default.string().min(1, "Service name is required").describe("Display name of the service offered (e.g., 'Haircut', 'Massage', 'Consultation'). Used by AI Powered Services when presenting booking options to customers."),
60
+ description: zod_1.default.string().describe("Detailed description of the service including what's included, benefits, or special instructions. Helps customers understand the service before booking via Service Appointment workflow."),
61
+ // Scheduling & Duration
62
+ duration: zod_1.default.number().int().positive().max(480).default(60).describe("Service duration in minutes with maximum of 480 minutes (8 hours). Used by AI Powered Services to calculate appointment end times and availability slots. Defaults to 60 minutes."),
63
+ bufferTime: zod_1.default.number().int().nonnegative().default(0).describe("Buffer time in minutes between consecutive appointments for cleanup, preparation, or transition. Ensures adequate spacing in Service Person schedules. Defaults to 0."),
64
+ isBookable: zod_1.default.boolean().default(true).describe("Whether this service can be booked online through AI Powered Services conversations. Services marked false require manual booking or are for internal use only. Defaults to true."),
65
+ // Pricing
66
+ price: zod_1.default.number().nonnegative().default(0).optional().describe("Service price in the account's currency. Used for Service Appointment pricing and customer quotes during AI conversations. Defaults to 0 for complimentary services."),
67
+ // Business Management
68
+ isActive: zod_1.default.boolean().default(true).describe("Whether the service is currently active and available for booking. Inactive services are hidden from customers and AI Powered Services. Defaults to true."),
69
+ // Dynamic Field Configuration
70
+ requiredDatafieldConfig: exports.ServiceAppointmentFieldConfigSchema.optional().describe("Service-level dynamic field configuration for capturing additional appointment information. Inherits fields from organization-level AppointmentFieldConfigSchema via inheritedFieldKeys, allows overrides via fieldOverrides, and supports service-specific fields via additionalFields. When omitted, no additional fields are collected for this service."),
71
+ });
72
+ /**
73
+ * Service QR code schema for appointment booking.
74
+ *
75
+ * @typedef {Object} ServiceQRCode
76
+ * @property {string} id - Unique identifier for the QR code
77
+ * @property {string} appointmentUrl - Direct link to the appointment page
78
+ * @property {string} [qrCodeImage] - Base64 encoded QR code image
79
+ * @property {string} [serviceId] - Specific service ID for direct appointment
80
+ */
81
+ exports.ServiceQRCodeSchema = zod_1.default.object({
82
+ id: zod_1.default.string().describe("Unique identifier for this QR code instance."),
83
+ appointmentUrl: zod_1.default.string().url().describe("URL to the appointment booking interface accessed by scanning this QR code. Links to service selection and scheduling flow powered by AI Powered Services."),
84
+ qrCodeImage: zod_1.default.string().optional().describe("Base64 encoded QR code image for printing or digital display (posters, flyers, websites). Generated from appointmentUrl."),
85
+ serviceId: zod_1.default.string().optional().describe("Optional specific Business Service ID for direct appointment booking. When provided, QR code bypasses service selection and goes directly to scheduling for this service."),
86
+ });
87
+ /**
88
+ * Schema for creating a new business service.
89
+ * Omits auto-generated fields.
90
+ */
91
+ exports.CreateBusinessServiceSchema = exports.BusinessServiceConfigSchema.omit({
92
+ id: true,
93
+ createdAt: true,
94
+ updatedAt: true,
95
+ });
96
+ /**
97
+ * Schema for updating an existing business service.
98
+ * All fields are optional except id.
99
+ */
100
+ exports.UpdateBusinessServiceSchema = exports.CreateBusinessServiceSchema.partial().safeExtend({
101
+ id: zod_1.default.string(),
102
+ });
@@ -0,0 +1,110 @@
1
+ import z from "zod";
2
+ /**
3
+ * @fileoverview Appointment Additional Info schema for storing dynamic field values.
4
+ * @module business-mgt/appointment-additional-info
5
+ *
6
+ * This schema represents the **Appointment Level** in the dynamic fields hierarchy:
7
+ *
8
+ * ```
9
+ * Organization Level (AppointmentFieldConfigSchema)
10
+ * │
11
+ * ▼ inherits via appointmentFieldConfigId
12
+ * Service Level (ServiceAppointmentFieldConfigSchema)
13
+ * │
14
+ * ▼ stores values
15
+ * Appointment Level (AppointmentAdditionalInfoSchema) ← THIS SCHEMA
16
+ * ```
17
+ *
18
+ * Stores the actual captured field values for a specific appointment instance.
19
+ * The `data` property contains key-value pairs where keys correspond to `fieldKey`
20
+ * values defined in the organization and service-level field configurations.
21
+ *
22
+ * @see AppointmentFieldConfigSchema - Organization-level field definitions
23
+ * @see ServiceAppointmentFieldConfigSchema - Service-level field customization
24
+ */
25
+ /**
26
+ * Schema for dynamic field value types.
27
+ * Accepts any value type to support the various DynamicFieldType values
28
+ * (text, number, boolean, date, select options, etc.)
29
+ */
30
+ export declare const DynamicFieldValueSchema: z.ZodAny;
31
+ export type DynamicFieldValue = z.infer<typeof DynamicFieldValueSchema>;
32
+ /**
33
+ * Appointment Additional Info schema.
34
+ * Stores dynamic field values captured during appointment booking.
35
+ *
36
+ * @typedef {Object} AppointmentAdditionalInfo
37
+ * @property {string} businessServiceId - Reference to the business service
38
+ * @property {string} appointmentId - Reference to the appointment instance
39
+ * @property {string} customerId - Reference to the customer who provided info
40
+ * @property {Object} data - Key-value store of captured field values
41
+ */
42
+ export declare const AppointmentAdditionalInfoSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ createdAt: z.ZodOptional<z.ZodNumber>;
45
+ updatedAt: z.ZodOptional<z.ZodNumber>;
46
+ businessServiceId: z.ZodString;
47
+ appointmentId: z.ZodString;
48
+ customerId: z.ZodString;
49
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
50
+ }, z.core.$strip>;
51
+ /**
52
+ * Schema for creating appointment additional info.
53
+ * Omits auto-generated fields.
54
+ */
55
+ export declare const CreateAppointmentAdditionalInfoSchema: z.ZodObject<{
56
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
57
+ customerId: z.ZodString;
58
+ businessServiceId: z.ZodString;
59
+ appointmentId: z.ZodString;
60
+ }, z.core.$strip>;
61
+ /**
62
+ * Schema for updating appointment additional info.
63
+ * All fields optional except id (required).
64
+ */
65
+ export declare const UpdateAppointmentAdditionalInfoSchema: z.ZodObject<{
66
+ data: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
67
+ customerId: z.ZodOptional<z.ZodString>;
68
+ businessServiceId: z.ZodOptional<z.ZodString>;
69
+ appointmentId: z.ZodOptional<z.ZodString>;
70
+ id: z.ZodString;
71
+ }, z.core.$strip>;
72
+ export type AppointmentAdditionalInfo = z.infer<typeof AppointmentAdditionalInfoSchema>;
73
+ export type CreateAppointmentAdditionalInfo = z.infer<typeof CreateAppointmentAdditionalInfoSchema>;
74
+ export type UpdateAppointmentAdditionalInfo = z.infer<typeof UpdateAppointmentAdditionalInfoSchema>;
75
+ /**
76
+ * Appointment additional info filter options.
77
+ * @interface AppointmentAdditionalInfoFilters
78
+ */
79
+ export interface AppointmentAdditionalInfoFilters {
80
+ /** Filter by business service ID */
81
+ businessServiceId?: string;
82
+ /** Filter by appointment ID */
83
+ appointmentId?: string;
84
+ /** Filter by customer ID */
85
+ customerId?: string;
86
+ }
87
+ /**
88
+ * Appointment additional info sorting options.
89
+ * @interface AppointmentAdditionalInfoSorting
90
+ */
91
+ export interface AppointmentAdditionalInfoSorting {
92
+ /** Field to sort by */
93
+ field: "createdAt" | "updatedAt";
94
+ /** Sort direction */
95
+ direction: "asc" | "desc";
96
+ }
97
+ /**
98
+ * Appointment additional info query options.
99
+ * @interface AppointmentAdditionalInfoQueryOptions
100
+ */
101
+ export interface AppointmentAdditionalInfoQueryOptions {
102
+ /** Page number (1-indexed) */
103
+ page: number;
104
+ /** Items per page */
105
+ pageSize: number;
106
+ /** Optional filters */
107
+ filters?: AppointmentAdditionalInfoFilters;
108
+ /** Optional sorting */
109
+ sorting?: AppointmentAdditionalInfoSorting;
110
+ }