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.
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/core/account/index.d.ts +7 -0
- package/dist/core/account/index.js +23 -0
- package/dist/core/account/organization.schema.d.ts +118 -0
- package/dist/core/account/organization.schema.js +91 -0
- package/dist/core/account/project.schema.d.ts +121 -0
- package/dist/core/account/project.schema.js +102 -0
- package/dist/core/account/supported-business-verticals.d.ts +8 -0
- package/dist/core/account/supported-business-verticals.js +23 -0
- package/dist/core/assistant-setups/assistant-setup-result.schema.d.ts +115 -0
- package/dist/core/assistant-setups/assistant-setup-result.schema.js +17 -0
- package/dist/core/assistant-setups/base-assistant-setup.schema.d.ts +61 -0
- package/dist/core/assistant-setups/base-assistant-setup.schema.js +29 -0
- package/dist/core/assistant-setups/index.d.ts +4 -0
- package/dist/core/assistant-setups/index.js +21 -0
- package/dist/core/assistant-setups/phone-assistant-setup.schema.d.ts +63 -0
- package/dist/core/assistant-setups/phone-assistant-setup.schema.js +14 -0
- package/dist/core/assistant-setups/web-assitant-setup.schema.d.ts +56 -0
- package/dist/core/assistant-setups/web-assitant-setup.schema.js +17 -0
- package/dist/core/base.schema.d.ts +34 -0
- package/dist/core/base.schema.js +36 -0
- package/dist/core/business-mgt/appointment-additional-info.schema.d.ts +63 -0
- package/dist/core/business-mgt/appointment-additional-info.schema.js +53 -0
- package/dist/core/business-mgt/appointment-field-config.schema.d.ts +251 -0
- package/dist/core/business-mgt/appointment-field-config.schema.js +49 -0
- package/dist/core/business-mgt/bookings.shared.schema.d.ts +47 -0
- package/dist/core/business-mgt/bookings.shared.schema.js +60 -0
- package/dist/core/business-mgt/business-location.schema.d.ts +327 -0
- package/dist/core/business-mgt/business-location.schema.js +176 -0
- package/dist/core/business-mgt/customer-management/customer-group.schema.d.ts +87 -0
- package/dist/core/business-mgt/customer-management/customer-group.schema.js +53 -0
- package/dist/core/business-mgt/customer-management/customer.schema.d.ts +156 -0
- package/dist/core/business-mgt/customer-management/customer.schema.js +93 -0
- package/dist/core/business-mgt/customer-management/index.d.ts +7 -0
- package/dist/core/business-mgt/customer-management/index.js +23 -0
- package/dist/core/business-mgt/customer-management/shipping-address.schema.d.ts +112 -0
- package/dist/core/business-mgt/customer-management/shipping-address.schema.js +79 -0
- package/dist/core/business-mgt/customer.schema.d.ts +111 -0
- package/dist/core/business-mgt/customer.schema.js +73 -0
- package/dist/core/business-mgt/discount-rule.schema.d.ts +183 -0
- package/dist/core/business-mgt/discount-rule.schema.js +108 -0
- package/dist/core/business-mgt/index.d.ts +16 -0
- package/dist/core/business-mgt/index.js +38 -0
- package/dist/core/business-mgt/menu-config.schema.d.ts +165 -0
- package/dist/core/business-mgt/menu-config.schema.js +86 -0
- package/dist/core/business-mgt/menu-management/index.d.ts +11 -0
- package/dist/core/business-mgt/menu-management/index.js +27 -0
- package/dist/core/business-mgt/menu-management/menu-catalog.schema.d.ts +386 -0
- package/dist/core/business-mgt/menu-management/menu-catalog.schema.js +58 -0
- package/dist/core/business-mgt/menu-management/menu-config.schema.d.ts +301 -0
- package/dist/core/business-mgt/menu-management/menu-config.schema.js +169 -0
- package/dist/core/business-mgt/menu-management/menu-item-variant.schema.d.ts +143 -0
- package/dist/core/business-mgt/menu-management/menu-item-variant.schema.js +86 -0
- package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.d.ts +239 -0
- package/dist/core/business-mgt/menu-management/menu-pricing-rule.schema.js +117 -0
- package/dist/core/business-mgt/menu-management/menu-set.schema.d.ts +420 -0
- package/dist/core/business-mgt/menu-management/menu-set.schema.js +283 -0
- package/dist/core/business-mgt/menu-management/menu.order.schema.d.ts +654 -0
- package/dist/core/business-mgt/menu-management/menu.order.schema.js +204 -0
- package/dist/core/business-mgt/menu-management/modifier.schema.d.ts +585 -0
- package/dist/core/business-mgt/menu-management/modifier.schema.js +341 -0
- package/dist/core/business-mgt/menu.order.schema.d.ts +335 -0
- package/dist/core/business-mgt/menu.order.schema.js +149 -0
- package/dist/core/business-mgt/order.schema.d.ts +222 -0
- package/dist/core/business-mgt/order.schema.js +205 -0
- package/dist/core/business-mgt/pricing-rule.shared.schema.d.ts +56 -0
- package/dist/core/business-mgt/pricing-rule.shared.schema.js +68 -0
- package/dist/core/business-mgt/product-config.schema.d.ts +177 -0
- package/dist/core/business-mgt/product-config.schema.js +106 -0
- package/dist/core/business-mgt/product-management/index.d.ts +12 -0
- package/dist/core/business-mgt/product-management/index.js +28 -0
- package/dist/core/business-mgt/product-management/product-axis-binding.schema.d.ts +54 -0
- package/dist/core/business-mgt/product-management/product-axis-binding.schema.js +54 -0
- package/dist/core/business-mgt/product-management/product-config.schema.d.ts +1042 -0
- package/dist/core/business-mgt/product-management/product-config.schema.js +392 -0
- package/dist/core/business-mgt/product-management/product-display.schema.d.ts +548 -0
- package/dist/core/business-mgt/product-management/product-display.schema.js +80 -0
- package/dist/core/business-mgt/product-management/product-order.schema.d.ts +493 -0
- package/dist/core/business-mgt/product-management/product-order.schema.js +158 -0
- package/dist/core/business-mgt/product-management/product-pricing-rule.schema.d.ts +167 -0
- package/dist/core/business-mgt/product-management/product-pricing-rule.schema.js +68 -0
- package/dist/core/business-mgt/product-management/product-set.schema.d.ts +488 -0
- package/dist/core/business-mgt/product-management/product-set.schema.js +273 -0
- package/dist/core/business-mgt/product-management/product-variant-axis.schema.d.ts +156 -0
- package/dist/core/business-mgt/product-management/product-variant-axis.schema.js +98 -0
- package/dist/core/business-mgt/product-management/product-variant.schema.d.ts +219 -0
- package/dist/core/business-mgt/product-management/product-variant.schema.js +130 -0
- package/dist/core/business-mgt/product-order.schema.d.ts +326 -0
- package/dist/core/business-mgt/product-order.schema.js +153 -0
- package/dist/core/business-mgt/property-config.schema.d.ts +621 -0
- package/dist/core/business-mgt/property-config.schema.js +224 -0
- package/dist/core/business-mgt/property-inquiry.schema.d.ts +222 -0
- package/dist/core/business-mgt/property-inquiry.schema.js +112 -0
- package/dist/core/business-mgt/property-management/index.d.ts +6 -0
- package/dist/core/business-mgt/property-management/index.js +22 -0
- package/dist/core/business-mgt/property-management/property-config.schema.d.ts +1306 -0
- package/dist/core/business-mgt/property-management/property-config.schema.js +367 -0
- package/dist/core/business-mgt/property-management/property-inquiry.schema.d.ts +254 -0
- package/dist/core/business-mgt/property-management/property-inquiry.schema.js +131 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/index.d.ts +3 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/index.js +19 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.d.ts +139 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-rental-assignment.schema.js +90 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.d.ts +104 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-room-assignment.schema.js +70 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.d.ts +104 -0
- package/dist/core/business-mgt/reservation-mgt/assignment/reservation-table-assignment.schema.js +72 -0
- package/dist/core/business-mgt/reservation-mgt/index.d.ts +14 -0
- package/dist/core/business-mgt/reservation-mgt/index.js +31 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.d.ts +180 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-floor-plan-definition.schema.js +75 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.d.ts +91 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-maintenance-block.schema.js +57 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.d.ts +334 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-rental.schema.js +179 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.d.ts +195 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-room.schema.js +106 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.d.ts +402 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-section.schema.js +198 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.d.ts +229 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-settings.schema.js +127 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.d.ts +382 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-slot-query.schema.js +322 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.d.ts +123 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table-layout.schema.js +83 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.d.ts +167 -0
- package/dist/core/business-mgt/reservation-mgt/reservation-table.schema.js +84 -0
- package/dist/core/business-mgt/reservation-mgt/reservation.schema.d.ts +0 -0
- package/dist/core/business-mgt/reservation-mgt/reservation.schema.js +153 -0
- package/dist/core/business-mgt/reservation-mgt/resource/index.d.ts +4 -0
- package/dist/core/business-mgt/reservation-mgt/resource/index.js +20 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.d.ts +157 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-category.schema.js +76 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.d.ts +137 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource-instance.schema.js +94 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.d.ts +713 -0
- package/dist/core/business-mgt/reservation-mgt/resource/reservation-resource.schema.js +363 -0
- package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.d.ts +151 -0
- package/dist/core/business-mgt/reservation-mgt/resource/resource-versioning.schema.js +147 -0
- package/dist/core/business-mgt/reservation-resource.schema.d.ts +154 -0
- package/dist/core/business-mgt/reservation-resource.schema.js +100 -0
- package/dist/core/business-mgt/reservation.schema.d.ts +119 -0
- package/dist/core/business-mgt/reservation.schema.js +89 -0
- package/dist/core/business-mgt/service-appointment.schema.d.ts +105 -0
- package/dist/core/business-mgt/service-appointment.schema.js +69 -0
- package/dist/core/business-mgt/service-config.schema.d.ts +453 -0
- package/dist/core/business-mgt/service-config.schema.js +102 -0
- package/dist/core/business-mgt/service-management/appointment-additional-info.schema.d.ts +110 -0
- package/dist/core/business-mgt/service-management/appointment-additional-info.schema.js +78 -0
- package/dist/core/business-mgt/service-management/appointment-field-config.schema.d.ts +304 -0
- package/dist/core/business-mgt/service-management/appointment-field-config.schema.js +75 -0
- package/dist/core/business-mgt/service-management/business-service-config.schema.d.ts +1226 -0
- package/dist/core/business-mgt/service-management/business-service-config.schema.js +317 -0
- package/dist/core/business-mgt/service-management/index.d.ts +13 -0
- package/dist/core/business-mgt/service-management/index.js +29 -0
- package/dist/core/business-mgt/service-management/service-appointment.schema.d.ts +531 -0
- package/dist/core/business-mgt/service-management/service-appointment.schema.js +116 -0
- package/dist/core/business-mgt/service-management/service-person.schema.d.ts +122 -0
- package/dist/core/business-mgt/service-management/service-person.schema.js +66 -0
- package/dist/core/business-mgt/service-management/service-pricing-rule.schema.d.ts +221 -0
- package/dist/core/business-mgt/service-management/service-pricing-rule.schema.js +118 -0
- package/dist/core/business-mgt/service-management/service-provider.schema.d.ts +90 -0
- package/dist/core/business-mgt/service-management/service-provider.schema.js +54 -0
- package/dist/core/business-mgt/service-management/service-slot-query.schema.d.ts +90 -0
- package/dist/core/business-mgt/service-management/service-slot-query.schema.js +113 -0
- package/dist/core/business-mgt/service-management/service-time-off.schema.d.ts +121 -0
- package/dist/core/business-mgt/service-management/service-time-off.schema.js +95 -0
- package/dist/core/business-mgt/service-person.schema.d.ts +43 -0
- package/dist/core/business-mgt/service-person.schema.js +38 -0
- package/dist/core/business-mgt/tax-rule.schema.d.ts +161 -0
- package/dist/core/business-mgt/tax-rule.schema.js +90 -0
- package/dist/core/conversation/conversation-config.schema.d.ts +644 -0
- package/dist/core/conversation/conversation-config.schema.js +351 -0
- package/dist/core/conversation/conversation-message.schema.d.ts +307 -0
- package/dist/core/conversation/conversation-message.schema.js +275 -0
- package/dist/core/conversation/index.d.ts +12 -0
- package/dist/core/conversation/index.js +28 -0
- package/dist/core/conversation/outbound-call.schema.d.ts +209 -0
- package/dist/core/conversation/outbound-call.schema.js +116 -0
- package/dist/core/conversation/outbound-email.schema.d.ts +338 -0
- package/dist/core/conversation/outbound-email.schema.js +150 -0
- package/dist/core/conversation/outbound-sms.schema.d.ts +163 -0
- package/dist/core/conversation/outbound-sms.schema.js +85 -0
- package/dist/core/conversation/outbound-template.schema.d.ts +375 -0
- package/dist/core/conversation/outbound-template.schema.js +160 -0
- package/dist/core/conversation/translation-config.schema.d.ts +92 -0
- package/dist/core/conversation/translation-config.schema.js +88 -0
- package/dist/core/conversation/translation-conversation.schema.d.ts +469 -0
- package/dist/core/conversation/translation-conversation.schema.js +175 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +30 -0
- package/dist/core/service-configuration/agent-config.schema.d.ts +236 -0
- package/dist/core/service-configuration/agent-config.schema.js +152 -0
- package/dist/core/service-configuration/base-agent-setup.d.ts +147 -0
- package/dist/core/service-configuration/base-agent-setup.js +123 -0
- package/dist/core/service-configuration/call-transfer-config.schema.d.ts +60 -0
- package/dist/core/service-configuration/call-transfer-config.schema.js +53 -0
- package/dist/core/service-configuration/deployment-config.schema.d.ts +522 -0
- package/dist/core/service-configuration/deployment-config.schema.js +271 -0
- package/dist/core/service-configuration/dynamic_setup/base-agent-setup.d.ts +130 -0
- package/dist/core/service-configuration/dynamic_setup/base-agent-setup.js +110 -0
- package/dist/core/service-configuration/dynamic_setup/index.d.ts +10 -0
- package/dist/core/service-configuration/dynamic_setup/index.js +26 -0
- package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.d.ts +111 -0
- package/dist/core/service-configuration/dynamic_setup/phone-agent-setup.js +56 -0
- package/dist/core/service-configuration/dynamic_setup/web-agent-setup.d.ts +113 -0
- package/dist/core/service-configuration/dynamic_setup/web-agent-setup.js +55 -0
- package/dist/core/service-configuration/index.d.ts +17 -0
- package/dist/core/service-configuration/index.js +33 -0
- package/dist/core/service-configuration/instruction-config.schema.d.ts +183 -0
- package/dist/core/service-configuration/instruction-config.schema.js +139 -0
- package/dist/core/service-configuration/interaction-channels.schema.d.ts +469 -0
- package/dist/core/service-configuration/interaction-channels.schema.js +390 -0
- package/dist/core/service-configuration/knowledge.schema.d.ts +107 -0
- package/dist/core/service-configuration/knowledge.schema.js +106 -0
- package/dist/core/service-configuration/phone-config.schema.d.ts +206 -0
- package/dist/core/service-configuration/phone-config.schema.js +121 -0
- package/dist/core/service-configuration/phone-number.schema.d.ts +236 -0
- package/dist/core/service-configuration/phone-number.schema.js +211 -0
- package/dist/core/service-configuration/provisioning-config.d.ts +429 -0
- package/dist/core/service-configuration/provisioning-config.js +307 -0
- package/dist/core/service-configuration/support-llm.d.ts +95 -0
- package/dist/core/service-configuration/support-llm.js +76 -0
- package/dist/core/service-configuration/voice-language.schema.d.ts +200 -0
- package/dist/core/service-configuration/voice-language.schema.js +166 -0
- package/dist/core/type-definitions/account-definitions.d.ts +82 -0
- package/dist/core/type-definitions/account-definitions.js +88 -0
- package/dist/core/type-definitions/business-definitions.d.ts +394 -0
- package/dist/core/type-definitions/business-definitions.js +447 -0
- package/dist/core/type-definitions/conversation.type.definition.d.ts +223 -0
- package/dist/core/type-definitions/conversation.type.definition.js +236 -0
- package/dist/core/type-definitions/display-order.d.ts +154 -0
- package/dist/core/type-definitions/display-order.js +154 -0
- package/dist/core/type-definitions/dynamic-fields/field-definition.schema.d.ts +165 -0
- package/dist/core/type-definitions/dynamic-fields/field-definition.schema.js +97 -0
- package/dist/core/type-definitions/dynamic-fields/field-types.d.ts +49 -0
- package/dist/core/type-definitions/dynamic-fields/field-types.js +104 -0
- package/dist/core/type-definitions/dynamic-fields/index.d.ts +9 -0
- package/dist/core/type-definitions/dynamic-fields/index.js +25 -0
- package/dist/core/type-definitions/index.d.ts +10 -0
- package/dist/core/type-definitions/index.js +26 -0
- package/dist/core/type-definitions/knowledge-definitions.d.ts +30 -0
- package/dist/core/type-definitions/knowledge-definitions.js +37 -0
- package/dist/core/type-definitions/service-config.definitions.d.ts +112 -0
- package/dist/core/type-definitions/service-config.definitions.js +135 -0
- package/dist/core/validators/channel-validation.d.ts +19 -0
- package/dist/core/validators/channel-validation.js +40 -0
- package/dist/core/validators/index.d.ts +5 -0
- package/dist/core/validators/index.js +21 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +24 -0
- package/dist/request/index.d.ts +5 -0
- package/dist/request/index.js +21 -0
- package/dist/request/models/index.d.ts +6 -0
- package/dist/request/models/index.js +22 -0
- package/dist/request/models/paginated-quest.schema.d.ts +33 -0
- package/dist/request/models/paginated-quest.schema.js +35 -0
- package/dist/request/models/paginated-result.schema.d.ts +124 -0
- package/dist/request/models/paginated-result.schema.js +94 -0
- package/package.json +43 -0
|
@@ -0,0 +1,317 @@
|
|
|
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.BusinessServiceCatalogSchema = exports.ServiceCatalogSchema = exports.UpdateBusinessServiceSchema = exports.CreateBusinessServiceSchema = exports.BusinessServiceConfigSchema = exports.UpdateServiceCategorySchema = exports.CreateServiceCategorySchema = exports.ServiceCategorySchema = exports.ServiceAppointmentFieldConfigSchema = exports.ServiceAvailabilitySchema = exports.ServiceDateRangeSchema = exports.ServiceDurationSegmentsSchema = exports.ServiceChannelMappingSchema = exports.ServiceCategoryChannelMappingSchema = exports.ServiceAvailabilityMode = exports.ServiceGratuityMode = exports.ServicePriceMode = 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 dynamic_fields_1 = require("../../type-definitions/dynamic-fields");
|
|
11
|
+
const business_definitions_1 = require("../../type-definitions/business-definitions");
|
|
12
|
+
const bookings_shared_schema_1 = require("../bookings.shared.schema");
|
|
13
|
+
/**
|
|
14
|
+
* @fileoverview Business Service Configuration schema definitions.
|
|
15
|
+
* @module business-mgt/business-service-config
|
|
16
|
+
*
|
|
17
|
+
* Manages service offerings including pricing, scheduling, availability,
|
|
18
|
+
* and booking rules for appointment-based businesses.
|
|
19
|
+
*/
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// ENUMS
|
|
22
|
+
// ============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Service pricing mode options.
|
|
25
|
+
* @enum {string}
|
|
26
|
+
*/
|
|
27
|
+
var ServicePriceMode;
|
|
28
|
+
(function (ServicePriceMode) {
|
|
29
|
+
/** Fixed price for the service */
|
|
30
|
+
ServicePriceMode["FIXED"] = "FIXED";
|
|
31
|
+
/** Starting price, final may vary */
|
|
32
|
+
ServicePriceMode["STARTS_AT"] = "STARTS_AT";
|
|
33
|
+
/** Variable pricing based on factors */
|
|
34
|
+
ServicePriceMode["VARIABLE"] = "VARIABLE";
|
|
35
|
+
})(ServicePriceMode || (exports.ServicePriceMode = ServicePriceMode = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Service gratuity mode options.
|
|
38
|
+
* @enum {string}
|
|
39
|
+
*/
|
|
40
|
+
var ServiceGratuityMode;
|
|
41
|
+
(function (ServiceGratuityMode) {
|
|
42
|
+
/** No gratuity accepted */
|
|
43
|
+
ServiceGratuityMode["NONE"] = "NONE";
|
|
44
|
+
/** Gratuity is optional */
|
|
45
|
+
ServiceGratuityMode["OPTIONAL"] = "OPTIONAL";
|
|
46
|
+
/** Gratuity is required */
|
|
47
|
+
ServiceGratuityMode["REQUIRED"] = "REQUIRED";
|
|
48
|
+
})(ServiceGratuityMode || (exports.ServiceGratuityMode = ServiceGratuityMode = {}));
|
|
49
|
+
/**
|
|
50
|
+
* Service availability mode options.
|
|
51
|
+
* @enum {string}
|
|
52
|
+
*/
|
|
53
|
+
var ServiceAvailabilityMode;
|
|
54
|
+
(function (ServiceAvailabilityMode) {
|
|
55
|
+
/** Service available 24/7 */
|
|
56
|
+
ServiceAvailabilityMode["ALWAYS"] = "ALWAYS";
|
|
57
|
+
/** Service follows custom schedule */
|
|
58
|
+
ServiceAvailabilityMode["SCHEDULED"] = "SCHEDULED";
|
|
59
|
+
/** Service inherits business hours */
|
|
60
|
+
ServiceAvailabilityMode["INHERIT"] = "INHERIT";
|
|
61
|
+
})(ServiceAvailabilityMode || (exports.ServiceAvailabilityMode = ServiceAvailabilityMode = {}));
|
|
62
|
+
// ============================================================================
|
|
63
|
+
// CHANNEL MAPPING SCHEMAS
|
|
64
|
+
// ============================================================================
|
|
65
|
+
/**
|
|
66
|
+
* Per-channel service category ID mapping.
|
|
67
|
+
* @typedef {Object} ServiceCategoryChannelMapping
|
|
68
|
+
* @property {string} channelId - Channel ID (e.g., yelp, google, mindbody)
|
|
69
|
+
* @property {string} externalCategoryId - External category ID for this specific channel
|
|
70
|
+
*/
|
|
71
|
+
exports.ServiceCategoryChannelMappingSchema = zod_1.default.object({
|
|
72
|
+
channelId: zod_1.default.string().describe("Channel ID (e.g., yelp, google, mindbody)"),
|
|
73
|
+
externalCategoryId: zod_1.default.string().describe("External category ID for this specific channel"),
|
|
74
|
+
}).describe("Per-channel external service category ID mapping");
|
|
75
|
+
/**
|
|
76
|
+
* Per-channel external service ID mapping.
|
|
77
|
+
* @typedef {Object} ServiceChannelMapping
|
|
78
|
+
* @property {string} channelId - Channel ID (e.g., yelp, google, mindbody)
|
|
79
|
+
* @property {string} externalServiceId - External service ID for this specific channel
|
|
80
|
+
* @property {string|null} [externalCategoryId] - External category ID in this channel, if needed for sync payloads
|
|
81
|
+
*/
|
|
82
|
+
exports.ServiceChannelMappingSchema = zod_1.default.object({
|
|
83
|
+
channelId: zod_1.default.string().describe("Channel ID (e.g., yelp, google, mindbody)"),
|
|
84
|
+
externalServiceId: zod_1.default.string().describe("External service ID for this specific channel"),
|
|
85
|
+
externalCategoryId: zod_1.default.string().nullable().optional().describe("External category ID in this channel, if needed for sync payloads"),
|
|
86
|
+
}).describe("Per-channel external service ID mapping");
|
|
87
|
+
/**
|
|
88
|
+
* Service duration segments schema.
|
|
89
|
+
* Breaks down service time into distinct phases.
|
|
90
|
+
* @typedef {Object} ServiceDurationSegments
|
|
91
|
+
* @property {number} prep - Preparation time in minutes
|
|
92
|
+
* @property {number} active - Hands-on active service time in minutes
|
|
93
|
+
* @property {number} processing - Processing/wait time in minutes
|
|
94
|
+
* @property {number} finish - Finishing time in minutes
|
|
95
|
+
* @property {number} turnover - Turnover/reset time in minutes
|
|
96
|
+
*/
|
|
97
|
+
exports.ServiceDurationSegmentsSchema = zod_1.default.object({
|
|
98
|
+
prep: zod_1.default.number().int().nonnegative().default(0).describe("Preparation time in minutes"),
|
|
99
|
+
active: zod_1.default.number().int().positive().default(60).describe("Hands-on active service time in minutes"),
|
|
100
|
+
processing: zod_1.default.number().int().nonnegative().default(0).describe("Processing/wait time in minutes"),
|
|
101
|
+
finish: zod_1.default.number().int().nonnegative().default(0).describe("Finishing time in minutes"),
|
|
102
|
+
turnover: zod_1.default.number().int().nonnegative().default(0).describe("Turnover/reset time in minutes"),
|
|
103
|
+
});
|
|
104
|
+
// ============================================================================
|
|
105
|
+
// SERVICE AVAILABILITY
|
|
106
|
+
// ============================================================================
|
|
107
|
+
/**
|
|
108
|
+
* Service date range schema.
|
|
109
|
+
* Defines seasonal availability or blackout periods.
|
|
110
|
+
* @typedef {Object} ServiceDateRange
|
|
111
|
+
* @property {string} startDate - Start date in ISO format (YYYY-MM-DD)
|
|
112
|
+
* @property {string} endDate - End date in ISO format (YYYY-MM-DD)
|
|
113
|
+
* @property {boolean} isExclusion - If true, service is NOT available during this range
|
|
114
|
+
*/
|
|
115
|
+
exports.ServiceDateRangeSchema = zod_1.default.object({
|
|
116
|
+
startDate: zod_1.default.string().describe("Start date in ISO format (YYYY-MM-DD)"),
|
|
117
|
+
endDate: zod_1.default.string().describe("End date in ISO format (YYYY-MM-DD)"),
|
|
118
|
+
isExclusion: zod_1.default.boolean().default(false).describe("If true, service is NOT available during this range"),
|
|
119
|
+
});
|
|
120
|
+
/**
|
|
121
|
+
* Service availability schema.
|
|
122
|
+
* Configures when a service is available for booking.
|
|
123
|
+
* @typedef {Object} ServiceAvailability
|
|
124
|
+
* @property {ServiceAvailabilityMode} mode - Availability mode: ALWAYS (24/7), SCHEDULED (custom), INHERIT (from business hours)
|
|
125
|
+
* @property {SimpleWeeklySchedule} [weeklySchedule] - Weekly availability schedule (required when mode is SCHEDULED)
|
|
126
|
+
* @property {ServiceDateRange[]} [dateRanges] - Date ranges for seasonal availability or blackout periods
|
|
127
|
+
*/
|
|
128
|
+
exports.ServiceAvailabilitySchema = zod_1.default.object({
|
|
129
|
+
mode: zod_1.default.enum(ServiceAvailabilityMode).default(ServiceAvailabilityMode.INHERIT)
|
|
130
|
+
.describe("Availability mode: ALWAYS (24/7), SCHEDULED (custom), INHERIT (from business hours)"),
|
|
131
|
+
weeklySchedule: business_definitions_1.SimpleWeeklyScheduleSchema.optional()
|
|
132
|
+
.describe("Weekly availability schedule (required when mode is SCHEDULED)"),
|
|
133
|
+
dateRanges: zod_1.default.array(exports.ServiceDateRangeSchema).optional()
|
|
134
|
+
.describe("Date ranges for seasonal availability or blackout periods"),
|
|
135
|
+
}).superRefine((data, ctx) => {
|
|
136
|
+
if (data.mode === ServiceAvailabilityMode.SCHEDULED && !data.weeklySchedule) {
|
|
137
|
+
ctx.addIssue({
|
|
138
|
+
code: "custom",
|
|
139
|
+
path: ["weeklySchedule"],
|
|
140
|
+
message: "weeklySchedule is required when mode is SCHEDULED",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* Service-level appointment field configuration (embedded).
|
|
146
|
+
* Inherits from organization-level config and allows service-specific customization.
|
|
147
|
+
* @typedef {Object} ServiceAppointmentFieldConfig
|
|
148
|
+
* @property {string[]} inheritedFieldKeys - Field keys inherited from organization-level config
|
|
149
|
+
* @property {FieldOverride[]} fieldOverrides - Service-specific field overrides
|
|
150
|
+
* @property {FieldDefinition[]} additionalFields - Additional fields specific to this service
|
|
151
|
+
* @property {boolean} isActive - Whether the field configuration is active
|
|
152
|
+
* @property {boolean} reuseDetails - Whether to reuse customer details from previous bookings
|
|
153
|
+
*/
|
|
154
|
+
exports.ServiceAppointmentFieldConfigSchema = zod_1.default.object({
|
|
155
|
+
inheritedFieldKeys: zod_1.default.array(zod_1.default.string()).default([]),
|
|
156
|
+
fieldOverrides: zod_1.default.array(dynamic_fields_1.FieldOverrideSchema).default([]),
|
|
157
|
+
additionalFields: zod_1.default.array(dynamic_fields_1.FieldDefinitionSchema).default([]),
|
|
158
|
+
isActive: zod_1.default.boolean().default(true),
|
|
159
|
+
reuseDetails: zod_1.default.boolean().default(false),
|
|
160
|
+
});
|
|
161
|
+
// ============================================================================
|
|
162
|
+
// SERVICE CATEGORY
|
|
163
|
+
// ============================================================================
|
|
164
|
+
/**
|
|
165
|
+
* Service Category schema.
|
|
166
|
+
* Groups related services for organization and display.
|
|
167
|
+
* @typedef {Object} ServiceCategory
|
|
168
|
+
* @property {string} id - Unique identifier
|
|
169
|
+
* @property {string} [serviceRevisionId] - Optional service revision ID for version-scoped data
|
|
170
|
+
* @property {string} name - Category name (e.g., Hair Services, Spa Treatments)
|
|
171
|
+
* @property {string|null} [description] - Category description
|
|
172
|
+
* @property {string|null} [imageUrl] - Category image URL
|
|
173
|
+
* @property {ServiceCategoryChannelMapping[]|null} [channelMappings] - Per-channel service category ID mappings
|
|
174
|
+
* @property {number|null} [displayOrder] - Display order in listing
|
|
175
|
+
* @property {boolean} isActive - Whether this category is active
|
|
176
|
+
* @property {Date} createdAt - Creation timestamp
|
|
177
|
+
* @property {Date} updatedAt - Last update timestamp
|
|
178
|
+
*/
|
|
179
|
+
exports.ServiceCategorySchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
180
|
+
serviceRevisionId: zod_1.default.string().nullable().optional().describe("Optional service revision ID for version-scoped data"),
|
|
181
|
+
name: zod_1.default.string().min(1, "Category name is required").describe("Category name (e.g., Hair Services, Spa Treatments)"),
|
|
182
|
+
description: zod_1.default.string().nullable().optional().describe("Category description"),
|
|
183
|
+
imageUrl: zod_1.default.url().nullable().optional().describe("Category image URL"),
|
|
184
|
+
channelMappings: zod_1.default.array(exports.ServiceCategoryChannelMappingSchema).nullable().optional().describe("Per-channel service category ID mappings"),
|
|
185
|
+
displayOrder: zod_1.default.number().int().nullable().optional().describe("Display order in listing"),
|
|
186
|
+
isActive: zod_1.default.boolean().default(true).describe("Whether this category is active"),
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* Schema for creating a new service category.
|
|
190
|
+
* Omits auto-generated fields.
|
|
191
|
+
*/
|
|
192
|
+
exports.CreateServiceCategorySchema = exports.ServiceCategorySchema.omit({
|
|
193
|
+
id: true,
|
|
194
|
+
createdAt: true,
|
|
195
|
+
updatedAt: true,
|
|
196
|
+
}).safeExtend({
|
|
197
|
+
placement: display_order_1.CreateDisplayOrderPlacementSchema.optional(),
|
|
198
|
+
});
|
|
199
|
+
/**
|
|
200
|
+
* Schema for updating an existing service category.
|
|
201
|
+
* All fields optional except id (required).
|
|
202
|
+
*/
|
|
203
|
+
exports.UpdateServiceCategorySchema = exports.CreateServiceCategorySchema.partial().safeExtend({
|
|
204
|
+
id: zod_1.default.string().describe("Unique identifier of the ServiceCategory to update"),
|
|
205
|
+
});
|
|
206
|
+
// ============================================================================
|
|
207
|
+
// BUSINESS SERVICE CONFIG
|
|
208
|
+
// ============================================================================
|
|
209
|
+
/**
|
|
210
|
+
* Business Service Configuration schema.
|
|
211
|
+
* Defines a service offering with pricing, scheduling, and booking rules.
|
|
212
|
+
* @typedef {Object} BusinessService
|
|
213
|
+
* @property {string} id - Unique identifier
|
|
214
|
+
* @property {string} [serviceRevisionId] - Optional service revision ID for version-scoped data
|
|
215
|
+
* @property {string} name - Name of the service offered
|
|
216
|
+
* @property {string|null} [description] - Detailed description of the service
|
|
217
|
+
* @property {string|null} [imageUrl] - Service image URL
|
|
218
|
+
* @property {string|null} [categoryId] - Service category ID
|
|
219
|
+
* @property {string|null} [bookingCode] - Short booking code for quick reference
|
|
220
|
+
* @property {number} duration - Service duration in minutes (max 8 hours)
|
|
221
|
+
* @property {ServiceDurationSegments|null} [durationSegments] - Segmented service duration breakdown
|
|
222
|
+
* @property {number} bufferBefore - Buffer before appointment start in minutes
|
|
223
|
+
* @property {number} bufferAfter - Buffer after appointment end in minutes
|
|
224
|
+
* @property {boolean} isBookable - Whether this service can be booked online
|
|
225
|
+
* @property {boolean|null} [allowsProcessingChairSwap] - Whether client can switch resources during processing segment
|
|
226
|
+
* @property {ServiceAvailability|null} [serviceAvailability] - Service-specific availability schedule
|
|
227
|
+
* @property {number|null} [maxConcurrentBookings] - Max simultaneous bookings for this service
|
|
228
|
+
* @property {number} basePrice - Base service price in account currency
|
|
229
|
+
* @property {ServicePriceMode|null} [priceMode] - Service pricing mode
|
|
230
|
+
* @property {ServiceGratuityMode|null} [gratuityMode] - Gratuity policy for this service
|
|
231
|
+
* @property {boolean} isActive - Whether the service is currently available
|
|
232
|
+
* @property {number|null} [displayOrder] - Display order in service listings
|
|
233
|
+
* @property {ServiceChannelMapping[]|null} [channelMappings] - Per-channel service ID mappings
|
|
234
|
+
* @property {string|null} [primaryServiceUserAccountId] - User account primarily responsible for this service
|
|
235
|
+
* @property {string[]} requiredResources - Required resource IDs for this service
|
|
236
|
+
* @property {ServiceBookingRules|null} [bookingRules] - Service-specific booking constraints
|
|
237
|
+
* @property {ServiceDepositStrategy|null} [depositStrategy] - Deposit strategy for this service
|
|
238
|
+
* @property {number|null} [depositValue] - Deposit amount or percentage depending on strategy
|
|
239
|
+
* @property {number} lateCancelFeePercent - Late cancellation fee percentage
|
|
240
|
+
* @property {number} noShowFeePercent - No-show fee percentage
|
|
241
|
+
* @property {ServiceAppointmentFieldConfig|null} [requiredDatafieldConfig] - Dynamic field configuration
|
|
242
|
+
* @property {Date} createdAt - Creation timestamp
|
|
243
|
+
* @property {Date} updatedAt - Last update timestamp
|
|
244
|
+
*/
|
|
245
|
+
exports.BusinessServiceConfigSchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
246
|
+
serviceRevisionId: zod_1.default.string().nullable().optional().describe("Optional service revision ID for version-scoped data"),
|
|
247
|
+
name: zod_1.default.string().min(1, "Service name is required").describe("Name of the service offered"),
|
|
248
|
+
description: zod_1.default.string().nullable().optional().describe("Detailed description of the service"),
|
|
249
|
+
imageUrl: zod_1.default.url().nullable().optional().describe("Service image URL"),
|
|
250
|
+
categoryId: zod_1.default.string().nullable().optional().describe("Service category ID"),
|
|
251
|
+
bookingCode: zod_1.default.string().nullable().optional().describe("Short booking code for quick reference"),
|
|
252
|
+
// Scheduling & Duration
|
|
253
|
+
duration: zod_1.default.number().int().positive().max(480).default(60).describe("Service duration in minutes (max 8 hours)"),
|
|
254
|
+
durationSegments: exports.ServiceDurationSegmentsSchema.nullable().optional().describe("Segmented service duration breakdown"),
|
|
255
|
+
bufferBefore: zod_1.default.number().int().nonnegative().default(0).describe("Buffer before appointment start in minutes"),
|
|
256
|
+
bufferAfter: zod_1.default.number().int().nonnegative().default(0).describe("Buffer after appointment end in minutes"),
|
|
257
|
+
isBookable: zod_1.default.boolean().default(true).describe("Whether this service can be booked online"),
|
|
258
|
+
allowsProcessingChairSwap: zod_1.default.boolean().nullable().optional().describe("Whether client can switch resources during processing segment"),
|
|
259
|
+
// Availability & Capacity
|
|
260
|
+
serviceAvailability: exports.ServiceAvailabilitySchema.nullable().optional().describe("Service-specific availability schedule"),
|
|
261
|
+
maxConcurrentBookings: zod_1.default.number().int().positive().nullable().optional().describe("Max simultaneous bookings for this service (null = 1)"),
|
|
262
|
+
// Pricing
|
|
263
|
+
basePrice: zod_1.default.number().nonnegative().default(0).describe("Base service price in account currency"),
|
|
264
|
+
priceMode: zod_1.default.enum(ServicePriceMode).nullable().optional().describe("Service pricing mode"),
|
|
265
|
+
gratuityMode: zod_1.default.enum(ServiceGratuityMode).nullable().optional().describe("Gratuity policy for this service"),
|
|
266
|
+
// Business Management
|
|
267
|
+
isActive: zod_1.default.boolean().default(true).describe("Whether the service is currently available"),
|
|
268
|
+
displayOrder: zod_1.default.number().int().nullable().optional().describe("Display order in service listings"),
|
|
269
|
+
channelMappings: zod_1.default.array(exports.ServiceChannelMappingSchema).nullable().optional().describe("Per-channel service ID mappings"),
|
|
270
|
+
primaryServiceUserAccountId: zod_1.default.string().nullable().optional().describe("User account primarily responsible for this service"),
|
|
271
|
+
requiredResources: zod_1.default.array(zod_1.default.string()).default([]).describe("Required resource IDs for this service"),
|
|
272
|
+
bookingRules: bookings_shared_schema_1.ServiceBookingRulesSchema.nullable().optional().describe("Service-specific booking constraints"),
|
|
273
|
+
depositStrategy: zod_1.default.enum(bookings_shared_schema_1.ServiceDepositStrategy).nullable().optional().describe("Deposit strategy for this service"),
|
|
274
|
+
depositValue: zod_1.default.number().nonnegative().nullable().optional().describe("Deposit amount or percentage depending on strategy"),
|
|
275
|
+
lateCancelFeePercent: zod_1.default.number().min(0).max(100).default(0).describe("Late cancellation fee percentage"),
|
|
276
|
+
noShowFeePercent: zod_1.default.number().min(0).max(100).default(0).describe("No-show fee percentage"),
|
|
277
|
+
// Dynamic Field Configuration
|
|
278
|
+
requiredDatafieldConfig: exports.ServiceAppointmentFieldConfigSchema.nullable().optional(),
|
|
279
|
+
});
|
|
280
|
+
/**
|
|
281
|
+
* Schema for creating a new business service.
|
|
282
|
+
* Omits auto-generated fields.
|
|
283
|
+
*/
|
|
284
|
+
exports.CreateBusinessServiceSchema = exports.BusinessServiceConfigSchema.omit({
|
|
285
|
+
id: true,
|
|
286
|
+
createdAt: true,
|
|
287
|
+
updatedAt: true,
|
|
288
|
+
}).safeExtend({
|
|
289
|
+
placement: display_order_1.CreateDisplayOrderPlacementSchema.optional(),
|
|
290
|
+
});
|
|
291
|
+
/**
|
|
292
|
+
* Schema for updating an existing business service.
|
|
293
|
+
* All fields optional except id (required).
|
|
294
|
+
*/
|
|
295
|
+
exports.UpdateBusinessServiceSchema = exports.CreateBusinessServiceSchema.partial().safeExtend({
|
|
296
|
+
id: zod_1.default.string().describe("Unique identifier of the BusinessService to update"),
|
|
297
|
+
});
|
|
298
|
+
// ============================================================================
|
|
299
|
+
// CATALOG SCHEMAS
|
|
300
|
+
// ============================================================================
|
|
301
|
+
/**
|
|
302
|
+
* Service catalog schema.
|
|
303
|
+
* Represents a category with its associated services.
|
|
304
|
+
* @typedef {Object} ServiceCatalog
|
|
305
|
+
* @property {ServiceCategory} serviceCategory - The service category
|
|
306
|
+
* @property {BusinessService[]} services - List of services in this category
|
|
307
|
+
*/
|
|
308
|
+
exports.ServiceCatalogSchema = zod_1.default.object({
|
|
309
|
+
serviceCategory: exports.ServiceCategorySchema,
|
|
310
|
+
services: zod_1.default.array(exports.BusinessServiceConfigSchema).describe("List of services in this category"),
|
|
311
|
+
}).describe("Schema representing a service category and its services");
|
|
312
|
+
/**
|
|
313
|
+
* Business service catalog schema.
|
|
314
|
+
* Array of service categories with their services.
|
|
315
|
+
* @typedef {ServiceCatalog[]} BusinessServiceCatalog
|
|
316
|
+
*/
|
|
317
|
+
exports.BusinessServiceCatalogSchema = zod_1.default.array(exports.ServiceCatalogSchema).describe("Schema representing a business service catalog");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Central export point for service management schemas.
|
|
3
|
+
* @module business-mgt/service-management
|
|
4
|
+
*/
|
|
5
|
+
export * from './appointment-additional-info.schema';
|
|
6
|
+
export * from './appointment-field-config.schema';
|
|
7
|
+
export * from './business-service-config.schema';
|
|
8
|
+
export * from './service-appointment.schema';
|
|
9
|
+
export * from './service-person.schema';
|
|
10
|
+
export * from './service-pricing-rule.schema';
|
|
11
|
+
export * from './service-provider.schema';
|
|
12
|
+
export * from './service-slot-query.schema';
|
|
13
|
+
export * from './service-time-off.schema';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Central export point for service management schemas.
|
|
4
|
+
* @module business-mgt/service-management
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./appointment-additional-info.schema"), exports);
|
|
22
|
+
__exportStar(require("./appointment-field-config.schema"), exports);
|
|
23
|
+
__exportStar(require("./business-service-config.schema"), exports);
|
|
24
|
+
__exportStar(require("./service-appointment.schema"), exports);
|
|
25
|
+
__exportStar(require("./service-person.schema"), exports);
|
|
26
|
+
__exportStar(require("./service-pricing-rule.schema"), exports);
|
|
27
|
+
__exportStar(require("./service-provider.schema"), exports);
|
|
28
|
+
__exportStar(require("./service-slot-query.schema"), exports);
|
|
29
|
+
__exportStar(require("./service-time-off.schema"), exports);
|