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,392 @@
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.ProductCategoryWithDescendantsSchema = exports.BusinessProductCatalogSchema = exports.ProductCatalogSchema = exports.UpdateBusinessProductSchema = exports.CreateBusinessProductSchema = exports.UpdateProductCategorySchema = exports.CreateProductCategorySchema = exports.UpdateAttributeDefSchema = exports.CreateAttributeDefSchema = exports.BusinessProductSchema = exports.ProductCategorySchema = exports.ProductChannelMappingSchema = exports.ProductCategoryChannelMappingSchema = exports.ProductAttributeValueSchema = exports.CategoryAttributeBindingSchema = exports.AttributeDefSchema = exports.BarcodeFormat = exports.CategoryLocationScope = exports.AttributeDefType = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const base_schema_1 = require("../../base.schema");
9
+ const display_order_1 = require("../../type-definitions/display-order");
10
+ const product_variant_schema_1 = require("./product-variant.schema");
11
+ /**
12
+ * @fileoverview Product configuration schema definitions for business management.
13
+ * @module business-mgt/product-config
14
+ *
15
+ * Includes categories, products, attribute definitions, and channel mappings
16
+ * for multi-platform product catalog management.
17
+ */
18
+ // ============================================================================
19
+ // ENUMS
20
+ // ============================================================================
21
+ /**
22
+ * Attribute definition type.
23
+ * Determines the data type of attribute values.
24
+ *
25
+ * @enum {string}
26
+ */
27
+ var AttributeDefType;
28
+ (function (AttributeDefType) {
29
+ AttributeDefType["STRING"] = "string";
30
+ AttributeDefType["NUMBER"] = "number";
31
+ AttributeDefType["BOOLEAN"] = "boolean";
32
+ AttributeDefType["ENUM"] = "enum";
33
+ AttributeDefType["DATE"] = "date";
34
+ AttributeDefType["URL"] = "url";
35
+ })(AttributeDefType || (exports.AttributeDefType = AttributeDefType = {}));
36
+ /**
37
+ * Category location scope.
38
+ * Determines whether category is inherited across locations or local.
39
+ *
40
+ * @enum {string}
41
+ */
42
+ var CategoryLocationScope;
43
+ (function (CategoryLocationScope) {
44
+ /** Category is inherited from parent organization */
45
+ CategoryLocationScope["INHERITED"] = "inherited";
46
+ /** Category is local to specific location */
47
+ CategoryLocationScope["LOCAL"] = "local";
48
+ })(CategoryLocationScope || (exports.CategoryLocationScope = CategoryLocationScope = {}));
49
+ /**
50
+ * Barcode format types.
51
+ * Supported barcode formats for product identifiers.
52
+ *
53
+ * @enum {string}
54
+ */
55
+ var BarcodeFormat;
56
+ (function (BarcodeFormat) {
57
+ BarcodeFormat["UPC_A"] = "UPC_A";
58
+ BarcodeFormat["UPC_E"] = "UPC_E";
59
+ BarcodeFormat["EAN_13"] = "EAN_13";
60
+ BarcodeFormat["EAN_8"] = "EAN_8";
61
+ BarcodeFormat["CODE_128"] = "CODE_128";
62
+ BarcodeFormat["CODE_39"] = "CODE_39";
63
+ BarcodeFormat["ITF_14"] = "ITF_14";
64
+ BarcodeFormat["QR"] = "QR";
65
+ })(BarcodeFormat || (exports.BarcodeFormat = BarcodeFormat = {}));
66
+ // ============================================================================
67
+ // ATTRIBUTE DEFINITION SCHEMAS
68
+ // ============================================================================
69
+ /**
70
+ * Attribute definition schema.
71
+ * Organization-level attribute definitions for products.
72
+ *
73
+ * @typedef {Object} AttributeDef
74
+ * @property {string} name - Attribute name (e.g., 'Voltage', 'Warranty Months')
75
+ * @property {string} slug - URL-friendly slug for the attribute
76
+ * @property {AttributeDefType} type - Attribute value type
77
+ * @property {string} [unit] - Unit of measurement
78
+ * @property {Array} [enumValues] - Allowed values for enum type
79
+ * @property {boolean} isActive - Whether attribute definition is active
80
+ */
81
+ exports.AttributeDefSchema = base_schema_1.BaseModelSchema.safeExtend({
82
+ name: zod_1.default.string().min(1).describe("Attribute name (e.g., 'Voltage', 'Warranty Months'). Used for product specification display."),
83
+ slug: zod_1.default.string().min(1).describe("URL-friendly slug for the attribute. Used for filtering and API queries."),
84
+ type: zod_1.default.enum(AttributeDefType).describe("Attribute value type determining validation and display formatting."),
85
+ unit: zod_1.default.string().nullable().optional().describe("Unit of measurement (e.g., 'V', 'kg', 'cm'). Displayed alongside attribute value."),
86
+ enumValues: zod_1.default.array(zod_1.default.string()).nullable().optional().describe("Allowed values for enum type. Only applicable when type is ENUM."),
87
+ isActive: zod_1.default.boolean().default(true).describe("Whether this attribute definition is active and available for use."),
88
+ });
89
+ /**
90
+ * Category attribute binding schema.
91
+ * Links categories to attribute definitions with category-specific settings.
92
+ *
93
+ * @typedef {Object} CategoryAttributeBinding
94
+ * @property {string} attributeDefId - Reference to AttributeDef.id
95
+ * @property {boolean} required - Whether attribute is required for products
96
+ * @property {number} displayOrder - Display order for this attribute
97
+ */
98
+ exports.CategoryAttributeBindingSchema = zod_1.default.object({
99
+ attributeDefId: zod_1.default.string().describe("Reference to AttributeDef.id. Links category to organization-level attribute definition."),
100
+ required: zod_1.default.boolean().default(false).describe("Whether this attribute is required for products in this category."),
101
+ displayOrder: zod_1.default.number().int().default(0).describe("Display order for this attribute in the category. Lower numbers appear first."),
102
+ }).describe("Category-to-attribute binding with category-specific settings");
103
+ /**
104
+ * Product attribute value schema.
105
+ * Stores actual attribute values for products.
106
+ *
107
+ * @typedef {Object} ProductAttributeValue
108
+ * @property {string} attributeDefId - Reference to AttributeDef.id
109
+ * @property {string|number|boolean} value - Attribute value
110
+ */
111
+ exports.ProductAttributeValueSchema = zod_1.default.object({
112
+ attributeDefId: zod_1.default.string().describe("Reference to AttributeDef.id. Links value to attribute definition for validation."),
113
+ value: zod_1.default.union([zod_1.default.string(), zod_1.default.number(), zod_1.default.boolean()]).describe("Attribute value. Type must match AttributeDef.type."),
114
+ }).describe("Product attribute value referencing a category attribute definition");
115
+ // ============================================================================
116
+ // CHANNEL MAPPING SCHEMAS
117
+ // ============================================================================
118
+ /**
119
+ * Product category channel mapping schema.
120
+ * Maps categories to external platform identifiers.
121
+ *
122
+ * @typedef {Object} ProductCategoryChannelMapping
123
+ * @property {string} channelId - Channel identifier
124
+ * @property {string} externalCategoryId - External category ID
125
+ */
126
+ exports.ProductCategoryChannelMappingSchema = zod_1.default.object({
127
+ channelId: zod_1.default.string().describe("Channel ID (e.g., 'shopify', 'amazon'). Platform identifier for external system."),
128
+ externalCategoryId: zod_1.default.string().describe("External category ID for this specific channel. Used for synchronization."),
129
+ }).describe("Per-channel external category ID mapping");
130
+ /**
131
+ * Product channel mapping schema.
132
+ * Maps products to external platform identifiers.
133
+ *
134
+ * @typedef {Object} ProductChannelMapping
135
+ * @property {string} channelId - Channel identifier
136
+ * @property {string} externalProductId - External product ID
137
+ * @property {string} [externalCategoryId] - External category ID in channel
138
+ */
139
+ exports.ProductChannelMappingSchema = zod_1.default.object({
140
+ channelId: zod_1.default.string().describe("Channel ID (e.g., 'shopify', 'amazon'). Platform identifier for external system."),
141
+ externalProductId: zod_1.default.string().describe("External product ID for this specific channel. Used for order reconciliation."),
142
+ externalCategoryId: zod_1.default.string().nullable().optional().describe("External category ID in this channel, if needed for sync payloads."),
143
+ }).describe("Per-channel external product ID mapping");
144
+ // ============================================================================
145
+ // PRODUCT CATEGORY SCHEMA
146
+ // ============================================================================
147
+ /**
148
+ * Product category schema.
149
+ *
150
+ * @typedef {Object} ProductCategory
151
+ * @property {string} [productRevisionId] - Version control for category changes
152
+ * @property {string} [parentId] - Parent category ID for nested hierarchy
153
+ * @property {string} name - Category name
154
+ * @property {string} [slug] - URL-friendly slug
155
+ * @property {string} [description] - Category description
156
+ * @property {Array} [channelMappings] - Per-channel category ID mappings
157
+ * @property {string} [iconId] - Icon image ID
158
+ * @property {string} [heroImageId] - Hero/banner image ID
159
+ * @property {number} [displayOrder] - Display order in catalog
160
+ * @property {boolean} isDefault - Whether this is the default category
161
+ * @property {Array} [attributeBindings] - Attribute bindings for products
162
+ * @property {Array} [defaultAxisIds] - Default variant axis IDs
163
+ * @property {Array} [defaultChannelIds] - Default channel IDs
164
+ * @property {string} [taxClassId] - Tax class ID
165
+ * @property {number} [targetMargin] - Target profit margin (0-1)
166
+ * @property {boolean} [ageRestricted] - Whether products are age-restricted
167
+ * @property {boolean} [requireImage] - Whether products must have an image
168
+ * @property {CategoryLocationScope} [locationScope] - Location inheritance scope
169
+ */
170
+ exports.ProductCategorySchema = base_schema_1.BaseModelSchema.safeExtend({
171
+ productRevisionId: zod_1.default.string().nullable().optional().describe("Optional product revision ID for version-scoped data. Ensures category applies to specific catalog version."),
172
+ parentId: zod_1.default.string().nullable().optional().describe("Parent category ID for nested hierarchy. Null for root categories."),
173
+ name: zod_1.default.string().min(1, "Category name is required").describe("Category name for product organization (e.g., Electronics, Clothing). Used by AI Powered Services when presenting product options."),
174
+ slug: zod_1.default.string().min(1).nullable().optional().describe("URL-friendly slug for the category. Used for SEO and deep linking."),
175
+ description: zod_1.default.string().nullable().optional().describe("Category description providing context about products included. Helps customers navigate the catalog."),
176
+ channelMappings: zod_1.default.array(exports.ProductCategoryChannelMappingSchema).nullable().optional().describe("Per-channel category ID mappings for external platform synchronization."),
177
+ // Media
178
+ iconId: zod_1.default.string().nullable().optional().describe("Icon image ID for category. Used in navigation menus and category lists."),
179
+ heroImageId: zod_1.default.string().nullable().optional().describe("Hero/banner image ID for category. Used on category landing pages."),
180
+ // Display
181
+ displayOrder: zod_1.default.number().int().nullable().optional().describe("Numeric order for category display in catalog. Lower numbers appear first."),
182
+ isDefault: zod_1.default.boolean().default(false).describe("Whether this is the default category for uncategorized products."),
183
+ // Attribute Bindings
184
+ attributeBindings: zod_1.default.array(exports.CategoryAttributeBindingSchema).nullable().optional().describe("Attribute bindings defining which attributes apply to products in this category."),
185
+ // Default Axes
186
+ defaultAxisIds: zod_1.default.array(zod_1.default.string()).nullable().optional().describe("Default variant axis IDs for products in this category (e.g., Size, Color)."),
187
+ // Distribution
188
+ defaultChannelIds: zod_1.default.array(zod_1.default.string()).nullable().optional().describe("Default channel IDs for products in this category. Products inherit these channels."),
189
+ // Tax & Margin
190
+ taxClassId: zod_1.default.string().nullable().optional().describe("Tax class ID for products in this category. Determines tax calculation rules."),
191
+ targetMargin: zod_1.default.number().min(0).max(1).nullable().optional().describe("Target profit margin (0-1) for products in this category. Used for pricing guidance."),
192
+ // Business Rules
193
+ ageRestricted: zod_1.default.boolean().nullable().optional().describe("Whether products in this category are age-restricted. Triggers age verification."),
194
+ requireImage: zod_1.default.boolean().nullable().optional().describe("Whether products in this category must have an image before publishing."),
195
+ // Location Scope
196
+ locationScope: zod_1.default.enum(CategoryLocationScope).nullable().optional().describe("Whether category is inherited across locations or local to specific location."),
197
+ });
198
+ // ============================================================================
199
+ // BUSINESS PRODUCT SCHEMA
200
+ // ============================================================================
201
+ /**
202
+ * Business product schema.
203
+ *
204
+ * @typedef {Object} BusinessProduct
205
+ * @property {string} [productRevisionId] - Version control for product changes
206
+ * @property {Array} [channelMappings] - Per-channel product ID mappings
207
+ * @property {string} name - Product name
208
+ * @property {string} [description] - Product description
209
+ * @property {string} [imageUrl] - Public image URL
210
+ * @property {Array} [imageUrls] - Product gallery image URLs
211
+ * @property {Array} [tags] - Product tags for search and filtering
212
+ * @property {number} price - Product price
213
+ * @property {number} [cost] - Cost of goods
214
+ * @property {number} [compareAtPrice] - Original price for sale display
215
+ * @property {string} [sku] - Stock Keeping Unit identifier
216
+ * @property {string} [skuPattern] - SKU template for variant generation
217
+ * @property {string} [barcode] - Product barcode
218
+ * @property {BarcodeFormat} [barcodeFormat] - Barcode format
219
+ * @property {boolean} [isAlcoholic] - Whether product is alcoholic
220
+ * @property {string} categoryId - Category ID
221
+ * @property {Object} [category] - Product category
222
+ * @property {string} [brand] - Product brand name
223
+ * @property {string} [brandId] - Product brand ID
224
+ * @property {boolean} trackInventory - Whether to track inventory
225
+ * @property {number} [stockQuantity] - Current stock quantity
226
+ * @property {number} [lowStockThreshold] - Low stock alert threshold
227
+ * @property {number} [stockedAt] - Unix timestamp when stock was last updated
228
+ * @property {number} [reorderPoint] - Inventory threshold for replenishment
229
+ * @property {number} [leadTime] - Supplier lead time in days
230
+ * @property {string} [supplierId] - Preferred supplier ID
231
+ * @property {number} [weight] - Product weight
232
+ * @property {Object} [dimensions] - Product dimensions
233
+ * @property {string} [shippingClassId] - Shipping class ID
234
+ * @property {string} [HSCode] - Harmonized System Code
235
+ * @property {Array} [attributes] - Product attribute values
236
+ * @property {Array} [taxRuleIds] - Tax rule IDs
237
+ * @property {boolean} isActive - Whether product is available for sale
238
+ * @property {number} [displayOrder] - Display order in category
239
+ */
240
+ exports.BusinessProductSchema = base_schema_1.BaseModelSchema.safeExtend({
241
+ productRevisionId: zod_1.default.string().nullable().optional().describe("Optional product revision ID for version-scoped data. Ensures product applies to specific catalog version."),
242
+ channelMappings: zod_1.default.array(exports.ProductChannelMappingSchema).nullable().optional().describe("Per-channel product ID mappings for external platform synchronization."),
243
+ name: zod_1.default.string().min(1, "Product name is required").describe("Display name of the product shown to customers. Used by AI Powered Services in order conversations."),
244
+ description: zod_1.default.string().nullable().optional().describe("Detailed product description including features and benefits. Enables AI-powered recommendations."),
245
+ imageUrl: zod_1.default.url().nullable().optional().describe("Public image URL for the product. Primary image shown in catalog and search results."),
246
+ imageUrls: zod_1.default.array(zod_1.default.url()).nullable().optional().describe("Public image URLs for the product gallery. Additional images for product detail page."),
247
+ tags: zod_1.default.array(zod_1.default.string()).nullable().optional().describe("List of product tags for search and filtering. Enables faceted navigation."),
248
+ // Pricing
249
+ price: zod_1.default.number().nonnegative().describe("Base price for this product in the account's currency. Used for order pricing calculations."),
250
+ cost: zod_1.default.number().nonnegative().nullable().optional().describe("Cost of goods for margin calculation. Used for profitability reporting."),
251
+ compareAtPrice: zod_1.default.number().nonnegative().nullable().optional().describe("Original price for sale/strikethrough display. Shows discount to customers."),
252
+ // Identifiers
253
+ sku: zod_1.default.string().nullable().optional().describe("Stock Keeping Unit identifier for inventory tracking. Unique alphanumeric code for warehouse operations."),
254
+ skuPattern: zod_1.default.string().nullable().optional().describe("SKU template/pattern for generating variant SKUs (e.g., 'PROD-{size}-{color}')."),
255
+ barcode: zod_1.default.string().nullable().optional().describe("Product barcode for point-of-sale scanning and inventory management."),
256
+ barcodeFormat: zod_1.default.enum(BarcodeFormat).nullable().optional().describe("Barcode format used for product identifiers (UPC-A, EAN-13, etc.)."),
257
+ // Classification
258
+ isAlcoholic: zod_1.default.boolean().nullable().optional().default(false).describe("Whether this product is alcoholic. Triggers age verification requirements."),
259
+ categoryId: zod_1.default.string().describe("References ProductCategory this product belongs to. Used for organization and browsing."),
260
+ category: exports.ProductCategorySchema.nullable().optional().describe("Populated ProductCategory object. Not required during creation."),
261
+ brand: zod_1.default.string().nullable().optional().describe("Product brand or manufacturer name for brand-based filtering."),
262
+ brandId: zod_1.default.string().nullable().optional().describe("Product brand ID for linking to brand entity."),
263
+ // Inventory
264
+ trackInventory: zod_1.default.boolean().default(false).describe("Whether inventory tracking is enabled. When true, stockQuantity is enforced."),
265
+ stockQuantity: zod_1.default.number().int().nonnegative().nullable().optional().describe("Current available stock quantity. Updated by orders and adjustments."),
266
+ lowStockThreshold: zod_1.default.number().int().nonnegative().nullable().optional().describe("Stock level that triggers low inventory alerts."),
267
+ stockedAt: zod_1.default.number().int().nullable().optional().describe("Unix timestamp when stock was last received or updated."),
268
+ reorderPoint: zod_1.default.number().int().nonnegative().nullable().optional().describe("Inventory threshold that should trigger replenishment order."),
269
+ leadTime: zod_1.default.number().int().nonnegative().nullable().optional().describe("Supplier lead time in days. Used for reorder timing."),
270
+ supplierId: zod_1.default.string().nullable().optional().describe("Preferred supplier ID for this product."),
271
+ // Physical Attributes
272
+ weight: zod_1.default.number().positive().nullable().optional().describe("Product weight for shipping calculations and carrier integration."),
273
+ dimensions: zod_1.default.object({
274
+ length: zod_1.default.number().positive().describe("Product length in specified units."),
275
+ width: zod_1.default.number().positive().describe("Product width in specified units."),
276
+ height: zod_1.default.number().positive().describe("Product height in specified units."),
277
+ unit: zod_1.default.enum(['inches', 'cm']).default('inches').describe("Measurement unit for dimensions."),
278
+ }).nullable().optional().describe("Physical dimensions for shipping cost estimation and warehouse management."),
279
+ // Shipping
280
+ shippingClassId: zod_1.default.string().nullable().optional().describe("Shipping class ID for the product. Determines shipping rates and methods."),
281
+ HSCode: zod_1.default.string().nullable().optional().describe("Harmonized System Code for international shipping and customs."),
282
+ // Attributes
283
+ attributes: zod_1.default.array(exports.ProductAttributeValueSchema).nullable().optional().describe("Product attribute values referencing category attribute definitions."),
284
+ // Tax
285
+ taxRuleIds: zod_1.default.array(zod_1.default.string()).nullable().optional().describe("Tax rule IDs applicable to this product. Overrides category tax settings."),
286
+ // Business Management
287
+ isActive: zod_1.default.boolean().default(true).describe("Whether product is active and available for sale. Inactive products are hidden."),
288
+ displayOrder: zod_1.default.number().int().nullable().optional().describe("Numeric order for product display within its category."),
289
+ // Ordering Analytics (Read Model only)
290
+ orderCount: zod_1.default.number().int().nonnegative().nullable().optional().describe("Total orders for this product (all time). Computed server-side."),
291
+ recentOrderCount: zod_1.default.number().int().nonnegative().nullable().optional().describe("Orders for this product in the last 30 days. Computed server-side."),
292
+ lastOrderedAt: zod_1.default.number().int().positive().nullable().optional().describe("Unix timestamp of the last order for this product. Computed server-side."),
293
+ });
294
+ // ============================================================================
295
+ // CREATE/UPDATE SCHEMAS
296
+ // ============================================================================
297
+ /**
298
+ * Schema for creating a new attribute definition.
299
+ * Omits auto-generated fields.
300
+ */
301
+ exports.CreateAttributeDefSchema = exports.AttributeDefSchema.omit({
302
+ id: true,
303
+ createdAt: true,
304
+ updatedAt: true,
305
+ });
306
+ /**
307
+ * Schema for updating an existing attribute definition.
308
+ * All fields optional except id (required).
309
+ */
310
+ exports.UpdateAttributeDefSchema = exports.CreateAttributeDefSchema.partial().safeExtend({
311
+ id: zod_1.default.string().describe("Unique identifier of the AttributeDef to update"),
312
+ });
313
+ /**
314
+ * Schema for creating a new product category.
315
+ * Omits auto-generated fields.
316
+ */
317
+ exports.CreateProductCategorySchema = exports.ProductCategorySchema.omit({
318
+ id: true,
319
+ createdAt: true,
320
+ updatedAt: true,
321
+ }).safeExtend({
322
+ placement: display_order_1.CreateDisplayOrderPlacementSchema.optional().describe("Optional placement for display ordering"),
323
+ });
324
+ /**
325
+ * Schema for updating an existing product category.
326
+ * All fields optional except id (required).
327
+ */
328
+ exports.UpdateProductCategorySchema = exports.CreateProductCategorySchema.partial().safeExtend({
329
+ id: zod_1.default.string().describe("Unique identifier of the ProductCategory to update"),
330
+ });
331
+ /**
332
+ * Schema for creating a new business product.
333
+ * Omits auto-generated fields, category object, and analytics.
334
+ *
335
+ * @remarks
336
+ * A product must be created with at least one variant. Nested variants use the
337
+ * product variant create schema with `productId` omitted; the parent link is
338
+ * assigned by the server once the product is created.
339
+ */
340
+ exports.CreateBusinessProductSchema = exports.BusinessProductSchema.omit({
341
+ id: true,
342
+ createdAt: true,
343
+ updatedAt: true,
344
+ category: true,
345
+ categoryId: true,
346
+ orderCount: true,
347
+ recentOrderCount: true,
348
+ lastOrderedAt: true,
349
+ }).safeExtend({
350
+ categoryId: zod_1.default.string().optional().describe("Category ID this product belongs to"),
351
+ placement: display_order_1.CreateDisplayOrderPlacementSchema.optional().describe("Optional placement for display ordering"),
352
+ variants: zod_1.default.array(product_variant_schema_1.CreateProductVariantSchema.omit({ productId: true })).min(1, "A product must have at least one variant").describe("Variants to create with this product. At least one is required; the parent product ID is assigned by the server."),
353
+ });
354
+ /**
355
+ * Schema for updating an existing business product.
356
+ * All fields optional except id (required).
357
+ */
358
+ exports.UpdateBusinessProductSchema = exports.CreateBusinessProductSchema.partial().safeExtend({
359
+ id: zod_1.default.string().describe("Unique identifier of the BusinessProduct to update"),
360
+ });
361
+ // ============================================================================
362
+ // CATALOG SCHEMAS
363
+ // ============================================================================
364
+ /**
365
+ * Product catalog schema.
366
+ * Represents a category with its list of products.
367
+ *
368
+ * @typedef {Object} ProductCatalog
369
+ * @property {Object} productCategory - The ProductCategory object
370
+ * @property {Array} items - List of products in this category
371
+ */
372
+ exports.ProductCatalogSchema = zod_1.default.object({
373
+ productCategory: exports.ProductCategorySchema.describe("The category for this catalog section"),
374
+ items: zod_1.default.array(exports.BusinessProductSchema).describe("List of products in this category"),
375
+ }).describe("Schema representing a product category and its items");
376
+ /**
377
+ * Business product catalog schema.
378
+ * Full catalog as array of category sections.
379
+ */
380
+ exports.BusinessProductCatalogSchema = zod_1.default.array(exports.ProductCatalogSchema).describe("Schema representing a complete business product catalog");
381
+ /**
382
+ * Product category with descendants schema.
383
+ * Read model only. Use when ProductCategoryFilters.includeDescendants is true.
384
+ */
385
+ exports.ProductCategoryWithDescendantsSchema = zod_1.default.lazy(() => exports.ProductCategorySchema.safeExtend({
386
+ descendants: zod_1.default.array(exports.ProductCategoryWithDescendantsSchema).optional()
387
+ .describe("Nested descendant categories"),
388
+ descendantIds: zod_1.default.array(zod_1.default.string()).optional()
389
+ .describe("Flattened list of descendant category IDs"),
390
+ descendantCount: zod_1.default.number().int().nonnegative().optional()
391
+ .describe("Total number of descendants"),
392
+ }));