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,271 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeploymentConfigurationDetailsSchema = exports.DeploymentConfigurationResultSchema = exports.UpdateDeploymentConfigurationSchema = exports.CreateChainDeploymentConfigurationSchema = exports.CreateDeploymentConfigurationSchema = exports.DeploymentConfigurationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_schema_1 = require("../base.schema");
6
+ const agent_config_schema_1 = require("./agent-config.schema");
7
+ const instruction_config_schema_1 = require("./instruction-config.schema");
8
+ const interaction_channels_schema_1 = require("./interaction-channels.schema");
9
+ const type_definitions_1 = require("../type-definitions");
10
+ const project_schema_1 = require("../account/project.schema");
11
+ /**
12
+ * @fileoverview Deployment configuration schema definitions.
13
+ *
14
+ * Deployment Configuration is the central composition entity in the Service Configuration architecture.
15
+ * It brings together agent behavior, instructions, organizational context, and channel configuration
16
+ * to create a complete deployable unit. Each deployment has exactly one channel (1:1 relationship).
17
+ *
18
+ * @module service-configuration/deployment-config
19
+ */
20
+ /**
21
+ * Zod schema for deployment configuration validation.
22
+ *
23
+ * The Deployment Configuration is the central composition entity that brings together agent behavior,
24
+ * instructions, and organizational context to create a deployable unit. It serves as the primary
25
+ * entity that operators interact with when setting up new agent deployments.
26
+ *
27
+ * @remarks
28
+ * **Architecture Context:**
29
+ * - **Central Entity**: Primary composition point for all deployment components
30
+ * - **Managed By**: Service Configuration (administrative oversight)
31
+ * - **Uses**: Agent Configuration (N:1), Instruction Configuration (N:1)
32
+ * - **Associated With**: Project (N:1 for organizational grouping)
33
+ * - **Has**: Deployment Channel (1:1 - each deployment exposes through exactly one channel)
34
+ * - **Pattern**: Multi-channel deployments require separate Deployment Configurations per channel
35
+ *
36
+ * **Provisioning Types:**
37
+ * - **DIRECT**: Agent processes interactions directly without additional chains
38
+ * - **CHAINED**: Uses provisioning chain (STT → Agent → TTS) for voice processing
39
+ *
40
+ * **Deployment Lifecycle:**
41
+ * - **PENDING**: Created but not yet activated
42
+ * - **ACTIVE**: Operational and accepting interactions
43
+ * - **SUSPENDED**: Temporarily paused
44
+ * - **FAILED**: Deployment encountered errors
45
+ *
46
+ * @typedef {Object} DeploymentConfigurationProperties
47
+ * @property {string} id - Unique identifier for the deployment configuration
48
+ * @property {string} projectId - ID of the project this deployment belongs to for organizational grouping and access control
49
+ * @property {string} deploymentChannelId - ID of the deployment channel (1:1 relationship - phone, SMS, web, or mobile)
50
+ * @property {string} [deploymentName] - Optional human-readable name for administrative identification
51
+ * @property {string} agentConfigurationId - ID of the agent configuration defining core behavior and capabilities (N:1)
52
+ * @property {string} instructionConfigurationId - ID of the instruction configuration providing behavioral guidelines (N:1)
53
+ * @property {DeploymentStatus} deploymentStatus - Current operational status (PENDING, ACTIVE, SUSPENDED, FAILED)
54
+ * @property {DeploymentProvisioningType} provisioningType - How this deployment processes interactions (DIRECT or CHAINED) (default: DIRECT)
55
+ * @property {string | null} [provisioningConfigChainId] - ID of the provisioning chain for voice processing (required for CHAINED type)
56
+ * @property {boolean} isActive - Whether this deployment is currently active and accepting interactions (default: false)
57
+ * @property {DeploymentChannel | null} [channel] - Populated deployment channel configuration (for detail views)
58
+ * @property {Project | null} [project] - Populated project information (for detail views)
59
+ * @property {AgentConfiguration | null} [agent] - Populated agent configuration (for detail views)
60
+ * @property {InstructionConfiguration | null} [instruction] - Populated instruction configuration (for detail views)
61
+ * @property {number} [createdAt] - Unix timestamp (milliseconds) when created
62
+ * @property {number} [updatedAt] - Unix timestamp (milliseconds) when last updated
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * const deployment: DeploymentConfiguration = {
67
+ * id: '123*',
68
+ * projectId: '456*',
69
+ * deploymentChannelId: 'abc*',
70
+ * deploymentName: 'Production Customer Support',
71
+ * agentConfigurationId: 'def*',
72
+ * instructionConfigurationId: 'ghi*',
73
+ * deploymentStatus: DeploymentStatus.ACTIVE,
74
+ * provisioningType: DeploymentProvisioningType.DIRECT,
75
+ * isActive: true,
76
+ * createdAt: Date.now(),
77
+ * updatedAt: Date.now()
78
+ * };
79
+ * ```
80
+ */
81
+ exports.DeploymentConfigurationSchema = base_schema_1.BaseModelSchema.safeExtend({
82
+ projectId: zod_1.z.string().describe("ID of the project this deployment belongs to for organizational grouping, access control, and resource management"),
83
+ deploymentChannelId: zod_1.z.string().describe("ID of the deployment channel through which this deployment is accessible (1:1 relationship - each deployment has exactly one channel)"),
84
+ deploymentName: zod_1.z.string().optional().describe("Optional human-readable name for the deployment used in administrative interfaces and reporting"),
85
+ agentConfigurationId: zod_1.z.string().describe("ID of the agent configuration that defines the agent's core behavior, capabilities, and LLM model (N:1 relationship - multiple deployments can share an agent)"),
86
+ instructionConfigurationId: zod_1.z.string().describe("ID of the instruction configuration that provides behavioral guidelines, role definition, and conversation patterns for the agent (N:1 relationship)"),
87
+ deploymentStatus: zod_1.z.enum(type_definitions_1.DeploymentStatus).describe("Current operational status of the deployment (PENDING: awaiting activation, ACTIVE: operational, SUSPENDED: temporarily paused, FAILED: encountered errors)"),
88
+ provisioningType: zod_1.z.enum(type_definitions_1.DeploymentProvisioningType).default(type_definitions_1.DeploymentProvisioningType.DIRECT).describe("How this deployment processes interactions: DIRECT for direct agent processing, CHAINED for provisioning chain (STT → Agent → TTS) voice processing"),
89
+ provisioningConfigChainId: zod_1.z.string().optional().nullable().describe("ID of the provisioning configuration chain for voice processing (required for CHAINED provisioning type, links STT, agent, and TTS models)"),
90
+ isActive: zod_1.z.boolean().default(false).describe("Whether this deployment is currently active and accepting user interactions (independent of deploymentStatus for granular control)"),
91
+ channel: interaction_channels_schema_1.DeploymentChannelSchema.optional().nullable().describe("Populated deployment channel configuration including type, identifier, and channel-specific settings (null if not loaded, populated for detail views)"),
92
+ project: project_schema_1.ProjectSchema.optional().nullable().describe("Populated project information including name and organizational details (null if not loaded, populated for detail views)"),
93
+ agent: agent_config_schema_1.AgentConfigurationSchema.optional().nullable().describe("Populated agent configuration including model, operational mode, and capabilities (null if not loaded, populated for detail views)"),
94
+ instruction: instruction_config_schema_1.InstructionConfigurationSchema.optional().nullable().describe("Populated instruction configuration including role, guidelines, and knowledge sources (null if not loaded, populated for detail views)"),
95
+ });
96
+ /**
97
+ * Zod schema for creating a new deployment configuration.
98
+ *
99
+ * Omits auto-generated fields and populated relations. Sets deployment to PENDING status
100
+ * with DIRECT provisioning by default.
101
+ *
102
+ * @remarks
103
+ * This schema enforces required fields for deployment creation while excluding
104
+ * fields that are automatically generated or populated by the system.
105
+ *
106
+ * @example
107
+ * ```typescript
108
+ * const newDeployment: CreateDeploymentConfiguration = {
109
+ * projectId: '456*',
110
+ * deploymentChannelId: 'abc*',
111
+ * deploymentName: 'Customer Support Line',
112
+ * agentConfigurationId: 'def*',
113
+ * instructionConfigurationId: 'ghi*',
114
+ * isActive: false,
115
+ * deploymentStatus: DeploymentStatus.PENDING,
116
+ * provisioningType: DeploymentProvisioningType.DIRECT
117
+ * };
118
+ * ```
119
+ */
120
+ exports.CreateDeploymentConfigurationSchema = exports.DeploymentConfigurationSchema.omit({
121
+ id: true,
122
+ createdAt: true,
123
+ updatedAt: true,
124
+ channel: true,
125
+ project: true,
126
+ agent: true,
127
+ instruction: true,
128
+ deploymentStatus: true,
129
+ provisioningType: true,
130
+ });
131
+ /**
132
+ * Zod schema for creating a chained deployment configuration.
133
+ *
134
+ * Similar to CreateDeploymentConfigurationSchema but requires a provisioningConfigChainId
135
+ * and sets provisioningType to CHAINED by default.
136
+ *
137
+ * @remarks
138
+ * Use this schema when creating deployments that are part of a provisioning chain.
139
+ * The provisioningConfigChainId is required to link this deployment to the chain.
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const chainedDeployment: CreateChainDeploymentConfiguration = {
144
+ * projectId: '456*',
145
+ * deploymentChannelId: 'abc*',
146
+ * deploymentName: 'Multi-Step Support Flow',
147
+ * agentConfigurationId: 'def*',
148
+ * instructionConfigurationId: 'ghi*',
149
+ * provisioningConfigChainId: 'xyz*',
150
+ * isActive: false,
151
+ * deploymentStatus: DeploymentStatus.PENDING,
152
+ * provisioningType: DeploymentProvisioningType.CHAINED
153
+ * };
154
+ * ```
155
+ */
156
+ exports.CreateChainDeploymentConfigurationSchema = exports.DeploymentConfigurationSchema.omit({
157
+ id: true,
158
+ createdAt: true,
159
+ updatedAt: true,
160
+ channel: true,
161
+ project: true,
162
+ agent: true,
163
+ instruction: true,
164
+ deploymentStatus: true,
165
+ provisioningType: true,
166
+ provisioningConfigChainId: true,
167
+ }).safeExtend({
168
+ provisioningConfigChainId: zod_1.z.string(),
169
+ deploymentStatus: zod_1.z.literal(type_definitions_1.DeploymentStatus.PENDING),
170
+ provisioningType: zod_1.z.enum(type_definitions_1.DeploymentProvisioningType).default(type_definitions_1.DeploymentProvisioningType.CHAINED),
171
+ });
172
+ /**
173
+ * Zod schema for updating an existing deployment configuration.
174
+ *
175
+ * All fields from CreateDeploymentConfigurationSchema are optional (partial),
176
+ * with the id field required to identify the deployment to update.
177
+ *
178
+ * @remarks
179
+ * Supports partial updates - only include the fields you want to modify.
180
+ * The id field is mandatory to specify which deployment configuration to update.
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * const updateDeployment: UpdateDeploymentConfiguration = {
185
+ * id: '123*',
186
+ * deploymentName: 'Updated Support Line',
187
+ * isActive: true,
188
+ * deploymentStatus: DeploymentStatus.ACTIVE
189
+ * };
190
+ * ```
191
+ */
192
+ exports.UpdateDeploymentConfigurationSchema = exports.CreateDeploymentConfigurationSchema.partial().safeExtend({
193
+ id: zod_1.z.string(),
194
+ provisioningConfigChainId: zod_1.z.string().optional(),
195
+ });
196
+ /**
197
+ * Zod schema for deployment configuration result (lightweight version).
198
+ *
199
+ * Omits populated relation fields (channel, project, agent, instruction) to provide
200
+ * a lighter payload suitable for list views and search results.
201
+ *
202
+ * @remarks
203
+ * Use this schema when returning deployment configurations in lists or search results
204
+ * where full relation details are not needed.
205
+ *
206
+ * @example
207
+ * ```typescript
208
+ * const deploymentResult: DeploymentConfigurationResult = {
209
+ * id: '123*',
210
+ * projectId: '456*',
211
+ * deploymentChannelId: 'abc*',
212
+ * deploymentName: 'Customer Support',
213
+ * agentConfigurationId: 'def*',
214
+ * instructionConfigurationId: 'ghi*',
215
+ * deploymentStatus: DeploymentStatus.ACTIVE,
216
+ * provisioningType: DeploymentProvisioningType.DIRECT,
217
+ * isActive: true,
218
+ * createdAt: Date.now(),
219
+ * updatedAt: Date.now()
220
+ * };
221
+ * ```
222
+ */
223
+ exports.DeploymentConfigurationResultSchema = exports.DeploymentConfigurationSchema.omit({
224
+ channel: true,
225
+ project: true,
226
+ agent: true,
227
+ instruction: true,
228
+ });
229
+ /**
230
+ * Zod schema for deployment configuration details (full version with all relations).
231
+ *
232
+ * Extends the base schema by requiring all relation fields to be fully populated
233
+ * with their complete schemas.
234
+ *
235
+ * @remarks
236
+ * Use this schema when returning a single deployment configuration with all
237
+ * associated details fully populated. Ideal for detail views where complete
238
+ * information about the deployment, channel, project, agent, and instruction is needed.
239
+ *
240
+ * @example
241
+ * ```typescript
242
+ * const deploymentDetails: DeploymentConfigurationDetails = {
243
+ * id: '123*',
244
+ * projectId: '456*',
245
+ * deploymentChannelId: 'abc*',
246
+ * deploymentName: 'Customer Support',
247
+ * agentConfigurationId: 'def*',
248
+ * instructionConfigurationId: 'ghi*',
249
+ * deploymentStatus: DeploymentStatus.ACTIVE,
250
+ * provisioningType: DeploymentProvisioningType.DIRECT,
251
+ * isActive: true,
252
+ * channel: { /* full DeploymentChannel object *\/ },
253
+ * project: { /* full Project object *\/ },
254
+ * agent: { /* full AgentConfiguration object *\/ },
255
+ * instruction: { /* full InstructionConfiguration object *\/ },
256
+ * createdAt: Date.now(),
257
+ * updatedAt: Date.now()
258
+ * };
259
+ * ```
260
+ */
261
+ exports.DeploymentConfigurationDetailsSchema = exports.DeploymentConfigurationSchema.omit({
262
+ channel: true,
263
+ project: true,
264
+ agent: true,
265
+ instruction: true,
266
+ }).safeExtend({
267
+ channel: interaction_channels_schema_1.DeploymentChannelSchema,
268
+ project: project_schema_1.ProjectSchema,
269
+ agent: agent_config_schema_1.AgentConfigurationSchema,
270
+ instruction: instruction_config_schema_1.InstructionConfigurationSchema,
271
+ });
@@ -0,0 +1,130 @@
1
+ import z from "zod";
2
+ import { AgentRoleTemplateIdentifier, SupportedProprietor } from "../../type-definitions";
3
+ /**
4
+ * @fileoverview Dynamic agent setup base schemas for AI assistant configuration.
5
+ * @module service-configuration/dynamic_setup/base-agent-setup
6
+ *
7
+ * Provides foundational schemas for configuring AI assistants across different
8
+ * channels (phone, web). These base schemas are extended by channel-specific
9
+ * configurations in phone-agent-setup.ts and web-agent-setup.ts.
10
+ */
11
+ /**
12
+ * Base agent setup schema.
13
+ *
14
+ * @typedef {Object} DynamicBaseAgentSetup
15
+ * @property {string} assistantName - Name of the AI assistant (max 30 characters)
16
+ * @property {string} [instructionConfigurationId] - ID of the instruction configuration
17
+ * @property {AgentRoleTemplateIdentifier} [role_template_identifier] - Role/persona for the agent
18
+ * @property {AgentCapabilities[]} [capabilities] - List of enabled platform services
19
+ * @property {string[]} [knowledgeSourceIds] - Knowledge source IDs to associate
20
+ * @property {string} [language] - Language ID (e.g., en, es, fr)
21
+ * @property {string} [voice] - Voice ID for voice interactions
22
+ * @property {SupportedProprietor} [providerType] - AI model provider type
23
+ * @property {string} [providerModelId] - Specific model ID from the provider
24
+ */
25
+ export declare const DynamicBaseAgentSetupSchema: z.ZodObject<{
26
+ assistantName: z.ZodString;
27
+ instructionConfigurationId: z.ZodOptional<z.ZodString>;
28
+ role_template_identifier: z.ZodOptional<z.ZodEnum<typeof AgentRoleTemplateIdentifier>>;
29
+ capabilities: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../../type-definitions").BusinessSupportServices>>>>;
30
+ knowledgeSourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
+ voice: z.ZodOptional<z.ZodString>;
33
+ providerType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof SupportedProprietor>>>;
34
+ providerModelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ }, z.core.$strip>;
36
+ /**
37
+ * Model configuration schema.
38
+ *
39
+ * @typedef {Object} DynamicModelConfiguration
40
+ * @property {SupportedProprietor} providerType - AI model provider type
41
+ * @property {string} providerModelId - Specific model ID from the provider
42
+ */
43
+ export declare const DynamicModelConfigurationSchema: z.ZodObject<{
44
+ providerType: z.ZodEnum<typeof SupportedProprietor>;
45
+ providerModelId: z.ZodString;
46
+ }, z.core.$strip>;
47
+ /**
48
+ * Speech-to-text model configuration schema.
49
+ *
50
+ * @typedef {Object} DynamicSTTModelConfiguration
51
+ * @property {SupportedProprietor} providerType - AI model provider type
52
+ * @property {string} providerModelId - Specific model ID from the provider
53
+ * @property {string} [languageId] - Language ID for speech recognition
54
+ */
55
+ export declare const DynamicSTTModelConfigurationSchema: z.ZodObject<{
56
+ providerType: z.ZodEnum<typeof SupportedProprietor>;
57
+ providerModelId: z.ZodString;
58
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
59
+ }, z.core.$strip>;
60
+ /**
61
+ * Text-to-speech model configuration schema.
62
+ *
63
+ * @typedef {Object} DynamicTTSModelConfiguration
64
+ * @property {SupportedProprietor} providerType - AI model provider type
65
+ * @property {string} providerModelId - Specific model ID from the provider
66
+ * @property {string} [languageId] - Language ID for speech synthesis
67
+ * @property {string} [voiceId] - Voice ID for speech output
68
+ */
69
+ export declare const DynamicTTSModelConfigurationSchema: z.ZodObject<{
70
+ providerType: z.ZodEnum<typeof SupportedProprietor>;
71
+ providerModelId: z.ZodString;
72
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
73
+ voiceId: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ /**
76
+ * Agent processing state schema for tracking long-running setup operations.
77
+ *
78
+ * @typedef {Object} DynamicAgentProcessingState
79
+ * @property {string} status - Current processing status (pending, in_progress, completed, failed)
80
+ * @property {number} progressPercentage - Progress percentage (0-100)
81
+ * @property {string} [message] - Additional details about current state
82
+ */
83
+ export declare const DynamicAgentProcessingStateSchema: z.ZodObject<{
84
+ status: z.ZodEnum<{
85
+ pending: "pending";
86
+ completed: "completed";
87
+ failed: "failed";
88
+ in_progress: "in_progress";
89
+ }>;
90
+ progressPercentage: z.ZodNumber;
91
+ message: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ /**
94
+ * Agent setup result schema.
95
+ * Extends BaseModelSchema to include id, createdAt, and updatedAt fields.
96
+ *
97
+ * @typedef {Object} DynamicAgentSetupResult
98
+ * @property {Object} processingState - Real-time processing state for async operations
99
+ * @property {boolean} [success] - Whether the setup was successful (nullable during processing)
100
+ * @property {string} [agentConfigurationId] - ID of the created agent configuration
101
+ * @property {string} [instructionConfigurationId] - ID of the created instruction configuration
102
+ * @property {string} [errorMessage] - Error message if setup failed
103
+ * @property {Object} [metadata] - Additional metadata about the setup
104
+ */
105
+ export declare const DynamicAgentSetupResultSchema: z.ZodObject<{
106
+ id: z.ZodString;
107
+ createdAt: z.ZodOptional<z.ZodNumber>;
108
+ updatedAt: z.ZodOptional<z.ZodNumber>;
109
+ processingState: z.ZodObject<{
110
+ status: z.ZodEnum<{
111
+ pending: "pending";
112
+ completed: "completed";
113
+ failed: "failed";
114
+ in_progress: "in_progress";
115
+ }>;
116
+ progressPercentage: z.ZodNumber;
117
+ message: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ success: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
120
+ agentConfigurationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ instructionConfigurationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ errorMessage: z.ZodOptional<z.ZodString>;
123
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
124
+ }, z.core.$strip>;
125
+ export type DynamicBaseAgentSetup = z.infer<typeof DynamicBaseAgentSetupSchema>;
126
+ export type DynamicModelConfiguration = z.infer<typeof DynamicModelConfigurationSchema>;
127
+ export type DynamicSTTModelConfiguration = z.infer<typeof DynamicSTTModelConfigurationSchema>;
128
+ export type DynamicTTSModelConfiguration = z.infer<typeof DynamicTTSModelConfigurationSchema>;
129
+ export type DynamicAgentProcessingState = z.infer<typeof DynamicAgentProcessingStateSchema>;
130
+ export type DynamicAgentSetupResult = z.infer<typeof DynamicAgentSetupResultSchema>;
@@ -0,0 +1,110 @@
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.DynamicAgentSetupResultSchema = exports.DynamicAgentProcessingStateSchema = exports.DynamicTTSModelConfigurationSchema = exports.DynamicSTTModelConfigurationSchema = exports.DynamicModelConfigurationSchema = exports.DynamicBaseAgentSetupSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const type_definitions_1 = require("../../type-definitions");
9
+ const base_schema_1 = require("../../base.schema");
10
+ /**
11
+ * @fileoverview Dynamic agent setup base schemas for AI assistant configuration.
12
+ * @module service-configuration/dynamic_setup/base-agent-setup
13
+ *
14
+ * Provides foundational schemas for configuring AI assistants across different
15
+ * channels (phone, web). These base schemas are extended by channel-specific
16
+ * configurations in phone-agent-setup.ts and web-agent-setup.ts.
17
+ */
18
+ /**
19
+ * Base agent setup schema.
20
+ *
21
+ * @typedef {Object} DynamicBaseAgentSetup
22
+ * @property {string} assistantName - Name of the AI assistant (max 30 characters)
23
+ * @property {string} [instructionConfigurationId] - ID of the instruction configuration
24
+ * @property {AgentRoleTemplateIdentifier} [role_template_identifier] - Role/persona for the agent
25
+ * @property {AgentCapabilities[]} [capabilities] - List of enabled platform services
26
+ * @property {string[]} [knowledgeSourceIds] - Knowledge source IDs to associate
27
+ * @property {string} [language] - Language ID (e.g., en, es, fr)
28
+ * @property {string} [voice] - Voice ID for voice interactions
29
+ * @property {SupportedProprietor} [providerType] - AI model provider type
30
+ * @property {string} [providerModelId] - Specific model ID from the provider
31
+ */
32
+ exports.DynamicBaseAgentSetupSchema = zod_1.default.object({
33
+ assistantName: zod_1.default.string().max(30).describe("Name of the AI assistant to use in conversations"),
34
+ instructionConfigurationId: zod_1.default.string().optional().describe("ID of the instruction configuration to use for this assistant"),
35
+ role_template_identifier: zod_1.default.enum(type_definitions_1.AgentRoleTemplateIdentifier).optional().describe("The role or persona that the agent adopts with this instruction set"),
36
+ capabilities: zod_1.default.array(zod_1.default.enum(type_definitions_1.AgentCapabilities)).optional().default([]).describe("List of platform services (tools) enabled for this agent configuration"),
37
+ knowledgeSourceIds: zod_1.default.array(zod_1.default.string()).optional().describe("List of knowledge source IDs to associate with this assistant"),
38
+ language: zod_1.default.string().optional().default("en").describe("Language ID for the assistant, e.g., en, es, fr, etc."),
39
+ voice: zod_1.default.string().optional().describe("Voice ID for the assistant, if applicable, used for voice interactions"),
40
+ providerType: zod_1.default.enum(type_definitions_1.SupportedProprietor).nullable().optional().describe("The AI model provider type for this agent configuration, e.g., OPENAI, AZURE, etc."),
41
+ providerModelId: zod_1.default.string().nullable().optional().describe("The specific model ID from the provider to use for this agent, e.g., gpt-4, gpt-3.5-turbo, etc."),
42
+ }).describe("Base schema for setting up an AI assistant, used for both phone and web channels");
43
+ /**
44
+ * Model configuration schema.
45
+ *
46
+ * @typedef {Object} DynamicModelConfiguration
47
+ * @property {SupportedProprietor} providerType - AI model provider type
48
+ * @property {string} providerModelId - Specific model ID from the provider
49
+ */
50
+ exports.DynamicModelConfigurationSchema = zod_1.default.object({
51
+ providerType: zod_1.default.enum(type_definitions_1.SupportedProprietor).describe("The AI model provider type for this agent configuration, e.g., OPENAI, AZURE, etc."),
52
+ providerModelId: zod_1.default.string().describe("The specific model ID from the provider to use for this agent, e.g., gpt-4, gpt-3.5-turbo, etc."),
53
+ }).describe("Base schema for model configuration");
54
+ /**
55
+ * Speech-to-text model configuration schema.
56
+ *
57
+ * @typedef {Object} DynamicSTTModelConfiguration
58
+ * @property {SupportedProprietor} providerType - AI model provider type
59
+ * @property {string} providerModelId - Specific model ID from the provider
60
+ * @property {string} [languageId] - Language ID for speech recognition
61
+ */
62
+ exports.DynamicSTTModelConfigurationSchema = exports.DynamicModelConfigurationSchema.extend({
63
+ languageId: zod_1.default.string().optional().default("en").describe("Language ID for the speech-to-text model, e.g., en, es, fr, etc."),
64
+ }).describe("Schema for speech-to-text model configuration, extending the base model configuration with language support");
65
+ /**
66
+ * Text-to-speech model configuration schema.
67
+ *
68
+ * @typedef {Object} DynamicTTSModelConfiguration
69
+ * @property {SupportedProprietor} providerType - AI model provider type
70
+ * @property {string} providerModelId - Specific model ID from the provider
71
+ * @property {string} [languageId] - Language ID for speech synthesis
72
+ * @property {string} [voiceId] - Voice ID for speech output
73
+ */
74
+ exports.DynamicTTSModelConfigurationSchema = exports.DynamicModelConfigurationSchema.extend({
75
+ languageId: zod_1.default.string().optional().default("en").describe("Language ID for the text-to-speech model, e.g., en, es, fr, etc."),
76
+ voiceId: zod_1.default.string().optional().describe("Voice ID for the text-to-speech model, if applicable"),
77
+ }).describe("Schema for text-to-speech model configuration, extending the base model configuration with language and voice support");
78
+ /**
79
+ * Agent processing state schema for tracking long-running setup operations.
80
+ *
81
+ * @typedef {Object} DynamicAgentProcessingState
82
+ * @property {string} status - Current processing status (pending, in_progress, completed, failed)
83
+ * @property {number} progressPercentage - Progress percentage (0-100)
84
+ * @property {string} [message] - Additional details about current state
85
+ */
86
+ exports.DynamicAgentProcessingStateSchema = zod_1.default.object({
87
+ status: zod_1.default.enum(["pending", "in_progress", "completed", "failed"]).describe("Current processing status of the agent setup"),
88
+ progressPercentage: zod_1.default.number().min(0).max(100).describe("Progress percentage of the agent setup process"),
89
+ message: zod_1.default.string().optional().describe("Optional message providing additional details about the current processing state"),
90
+ }).describe("Schema for representing the processing state of a dynamic agent setup, useful for tracking long-running setup operations");
91
+ /**
92
+ * Agent setup result schema.
93
+ * Extends BaseModelSchema to include id, createdAt, and updatedAt fields.
94
+ *
95
+ * @typedef {Object} DynamicAgentSetupResult
96
+ * @property {Object} processingState - Real-time processing state for async operations
97
+ * @property {boolean} [success] - Whether the setup was successful (nullable during processing)
98
+ * @property {string} [agentConfigurationId] - ID of the created agent configuration
99
+ * @property {string} [instructionConfigurationId] - ID of the created instruction configuration
100
+ * @property {string} [errorMessage] - Error message if setup failed
101
+ * @property {Object} [metadata] - Additional metadata about the setup
102
+ */
103
+ exports.DynamicAgentSetupResultSchema = base_schema_1.BaseModelSchema.safeExtend({
104
+ processingState: exports.DynamicAgentProcessingStateSchema.describe("Optional field to provide real-time processing state of the agent setup, useful for asynchronous operations"),
105
+ success: zod_1.default.boolean().nullable().optional().describe("Indicates if the assistant setup was successful"),
106
+ agentConfigurationId: zod_1.default.string().nullable().optional().describe("ID of the agent configuration created for this assistant"),
107
+ instructionConfigurationId: zod_1.default.string().nullable().optional().describe("ID of the instruction configuration created for this assistant"),
108
+ errorMessage: zod_1.default.string().optional().describe("Error message if the setup failed, otherwise undefined"),
109
+ metadata: zod_1.default.record(zod_1.default.string(), zod_1.default.any()).nullable().optional().describe("Additional metadata about the assistant setup, if any"),
110
+ }).describe("Schema for the result of creating or setting up a new AI assistant with dynamic setup");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview Central export point for dynamic agent setup schemas.
3
+ * @module service-configuration/dynamic_setup
4
+ *
5
+ * Provides schemas for dynamically configuring AI assistants across different
6
+ * communication channels (phone, web). Includes base configuration schemas
7
+ * and channel-specific extensions for voice and text interactions.
8
+ */
9
+ export * from './phone-agent-setup';
10
+ export * from './web-agent-setup';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Central export point for dynamic agent setup schemas.
4
+ * @module service-configuration/dynamic_setup
5
+ *
6
+ * Provides schemas for dynamically configuring AI assistants across different
7
+ * communication channels (phone, web). Includes base configuration schemas
8
+ * and channel-specific extensions for voice and text interactions.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ __exportStar(require("./phone-agent-setup"), exports);
26
+ __exportStar(require("./web-agent-setup"), exports);
@@ -0,0 +1,111 @@
1
+ import z from "zod";
2
+ /**
3
+ * @fileoverview Phone agent setup schemas for AI assistant configuration.
4
+ * @module service-configuration/dynamic_setup/phone-agent-setup
5
+ *
6
+ * Provides schemas for configuring AI assistants deployed on phone/telephony channels.
7
+ * Extends the base agent setup with phone-specific settings like phone configuration,
8
+ * test numbers, and required voice interaction configurations (STT/TTS).
9
+ */
10
+ /**
11
+ * Phone agent setup schema.
12
+ *
13
+ * @typedef {Object} DynamicPhoneAgentSetup
14
+ * @property {string} [phoneConfigurationId] - ID of the phone configuration
15
+ * @property {string} [testPhoneNumber] - Phone number for testing
16
+ * @property {Object} [sttConfiguration] - Speech-to-text configuration (required for voice)
17
+ * @property {Object} [ttsConfiguration] - Text-to-speech configuration (required for voice)
18
+ */
19
+ export declare const DynamicPhoneAgentSchema: z.ZodObject<{
20
+ assistantName: z.ZodString;
21
+ instructionConfigurationId: z.ZodOptional<z.ZodString>;
22
+ role_template_identifier: z.ZodOptional<z.ZodEnum<typeof import("../..").AgentRoleTemplateIdentifier>>;
23
+ capabilities: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../..").BusinessSupportServices>>>>;
24
+ knowledgeSourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ textKnowledgeSource: z.ZodOptional<z.ZodObject<{
26
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ content: z.ZodString;
28
+ }, z.core.$strip>>;
29
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
30
+ voice: z.ZodOptional<z.ZodString>;
31
+ providerType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../..").SupportedProprietor>>>;
32
+ providerModelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ phoneConfigurationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ testPhoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ sttConfiguration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
36
+ providerType: z.ZodEnum<typeof import("../..").SupportedProprietor>;
37
+ providerModelId: z.ZodString;
38
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
39
+ }, z.core.$strip>>>;
40
+ ttsConfiguration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
41
+ providerType: z.ZodEnum<typeof import("../..").SupportedProprietor>;
42
+ providerModelId: z.ZodString;
43
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
44
+ voiceId: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strip>>>;
46
+ }, z.core.$strip>;
47
+ /**
48
+ * Phone agent setup result schema.
49
+ *
50
+ * @typedef {Object} DynamicPhoneAgentSetupResult
51
+ * @property {boolean} success - Whether the setup was successful
52
+ * @property {string} agentConfigurationId - ID of the created agent configuration
53
+ * @property {string} instructionConfigurationId - ID of the created instruction configuration
54
+ * @property {string} phoneNumber - Phone number associated with the configuration
55
+ */
56
+ export declare const DynamicPhoneAgentSetupResultSchema: z.ZodObject<{
57
+ id: z.ZodString;
58
+ createdAt: z.ZodOptional<z.ZodNumber>;
59
+ updatedAt: z.ZodOptional<z.ZodNumber>;
60
+ processingState: z.ZodObject<{
61
+ status: z.ZodEnum<{
62
+ pending: "pending";
63
+ completed: "completed";
64
+ failed: "failed";
65
+ in_progress: "in_progress";
66
+ }>;
67
+ progressPercentage: z.ZodNumber;
68
+ message: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>;
70
+ success: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
71
+ agentConfigurationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ instructionConfigurationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
+ errorMessage: z.ZodOptional<z.ZodString>;
74
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
75
+ phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ }, z.core.$strip>;
77
+ /**
78
+ * Schema for updating an existing phone agent configuration.
79
+ * All fields are optional except id.
80
+ */
81
+ export declare const UpdateDynamicPhoneAgentSchema: z.ZodObject<{
82
+ id: z.ZodString;
83
+ voice: z.ZodOptional<z.ZodOptional<z.ZodString>>;
84
+ language: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodString>>>;
85
+ instructionConfigurationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
86
+ assistantName: z.ZodOptional<z.ZodString>;
87
+ role_template_identifier: z.ZodOptional<z.ZodOptional<z.ZodEnum<typeof import("../..").AgentRoleTemplateIdentifier>>>;
88
+ capabilities: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../..").BusinessSupportServices>>>>>;
89
+ knowledgeSourceIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
90
+ textKnowledgeSource: z.ZodOptional<z.ZodOptional<z.ZodObject<{
91
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
+ content: z.ZodString;
93
+ }, z.core.$strip>>>;
94
+ providerType: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../..").SupportedProprietor>>>>;
95
+ providerModelId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
96
+ testPhoneNumber: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
97
+ sttConfiguration: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
98
+ providerType: z.ZodEnum<typeof import("../..").SupportedProprietor>;
99
+ providerModelId: z.ZodString;
100
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
101
+ }, z.core.$strip>>>>;
102
+ ttsConfiguration: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
103
+ providerType: z.ZodEnum<typeof import("../..").SupportedProprietor>;
104
+ providerModelId: z.ZodString;
105
+ languageId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
106
+ voiceId: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strip>>>>;
108
+ }, z.core.$strip>;
109
+ export type DynamicPhoneAgentSetup = z.infer<typeof DynamicPhoneAgentSchema>;
110
+ export type UpdateDynamicPhoneAgent = z.infer<typeof UpdateDynamicPhoneAgentSchema>;
111
+ export type DynamicPhoneAgentSetupResult = z.infer<typeof DynamicPhoneAgentSetupResultSchema>;