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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 WIIL
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Wiil Core JS
|
|
2
|
+
|
|
3
|
+
Public schema definitions for WIIL Platform REST API resources and SDKs.
|
|
4
|
+
|
|
5
|
+
This package exposes Zod schemas, inferred TypeScript types, and request utility
|
|
6
|
+
models used by WIIL services and generated client SDKs. The source of truth lives
|
|
7
|
+
under `src/core`; the public API examples and resource guides live under
|
|
8
|
+
`documentation`.
|
|
9
|
+
|
|
10
|
+
## Package
|
|
11
|
+
|
|
12
|
+
- Package name: `wiil-core-js`
|
|
13
|
+
- Runtime format: CommonJS
|
|
14
|
+
- Validation library: `zod`
|
|
15
|
+
- Main entrypoint: `dist/index.js`
|
|
16
|
+
- Type declarations: `dist/index.d.ts`
|
|
17
|
+
|
|
18
|
+
## What This Package Contains
|
|
19
|
+
|
|
20
|
+
### Core Schemas
|
|
21
|
+
|
|
22
|
+
`src/core` is the central schema surface.
|
|
23
|
+
|
|
24
|
+
| Area | Purpose |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `account` | Organizations, projects, and supported business verticals |
|
|
27
|
+
| `assistant-setups` | Assistant setup definitions |
|
|
28
|
+
| `business-mgt` | Business catalog, customer, order, booking, reservation, and pricing resources |
|
|
29
|
+
| `conversation` | Conversation configs, messages, translation, outbound calls, email, SMS, and templates |
|
|
30
|
+
| `service-configuration` | Agent, instruction, deployment, channel, voice, telephony, knowledge, and dynamic setup schemas |
|
|
31
|
+
| `type-definitions` | Shared enums, dynamic field definitions, and reusable type primitives |
|
|
32
|
+
| `validators` | Shared validation helpers |
|
|
33
|
+
| `base.schema.ts` | Base model, address, phone number, and language code schemas |
|
|
34
|
+
|
|
35
|
+
The root package exports `src/core` and `src/request`.
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import {
|
|
39
|
+
BusinessLocationSchema,
|
|
40
|
+
CreateCustomerGroupSchema,
|
|
41
|
+
DeploymentConfigurationSchema,
|
|
42
|
+
} from "wiil-core-js";
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Business Management Domains
|
|
46
|
+
|
|
47
|
+
The `business-mgt` module exports shared business resources and domain-specific
|
|
48
|
+
catalog models.
|
|
49
|
+
|
|
50
|
+
| Domain | Examples |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| Shared business resources | Business locations, tax rules, discount rules, orders, pricing rules, booking primitives |
|
|
53
|
+
| Customer management | Customers, customer groups, shipping addresses |
|
|
54
|
+
| Service management | Service categories, service configs, providers, appointments, slot queries, pricing rules |
|
|
55
|
+
| Reservation management | Resource catalogs, floor plans, sections, table/room/rental reservations, assignments, settings, slot queries |
|
|
56
|
+
| Menu management | Menu categories, menu items, variants, modifiers, menu sets, menu pricing rules, menu orders |
|
|
57
|
+
| Product management | Product categories, products, variants, axes, product sets, pricing rules, product orders |
|
|
58
|
+
| Property management | Property catalog resources |
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
The `documentation` folder contains the public REST and SDK-facing resource
|
|
63
|
+
guides. Request and response examples in these files are represented as JSON,
|
|
64
|
+
not TypeScript implementation snippets.
|
|
65
|
+
|
|
66
|
+
| Documentation Area | Files |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Catalog overview | `documentation/catalog/*.md` |
|
|
69
|
+
| Business locations | `documentation/catalog/business-location.md` |
|
|
70
|
+
| Customer management | `documentation/catalog/customer-management.md` |
|
|
71
|
+
| Menu ordering | `documentation/catalog/menu-order-management/*.md` |
|
|
72
|
+
| Product ordering | `documentation/catalog/product-order-management/*.md` |
|
|
73
|
+
| Reservation management | `documentation/catalog/reservation-management/*.md` |
|
|
74
|
+
| Service appointments | `documentation/catalog/service-appointment-management/*.md` |
|
|
75
|
+
| Service configuration | `documentation/service-configuration/*.md` |
|
|
76
|
+
| Conversation and communication | `documentation/service-conversation.md`, `documentation/communication-request.md`, `documentation/translation-*.md` |
|
|
77
|
+
| Shared pricing resources | `documentation/tax-rule.md`, `documentation/discount-rule.md` |
|
|
78
|
+
|
|
79
|
+
## Runtime JSON Payloads
|
|
80
|
+
|
|
81
|
+
API payloads are plain JSON. The schemas in this package validate those payloads
|
|
82
|
+
and provide SDK type inference.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"name": "Downtown Branch",
|
|
87
|
+
"code": "DTWN",
|
|
88
|
+
"status": "ACTIVE",
|
|
89
|
+
"isPrimary": true,
|
|
90
|
+
"timezone": "America/New_York",
|
|
91
|
+
"businessHours": {
|
|
92
|
+
"1": {
|
|
93
|
+
"isOpen": true,
|
|
94
|
+
"startTime": "09:00",
|
|
95
|
+
"endTime": "17:00"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"phoneNumber": "+15551234567",
|
|
99
|
+
"email": "downtown@example.com",
|
|
100
|
+
"coordinates": {
|
|
101
|
+
"latitude": 39.7817,
|
|
102
|
+
"longitude": -89.6501
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## TypeScript Consumers
|
|
108
|
+
|
|
109
|
+
Consumers can parse, validate, and infer types from the exported schemas.
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { BusinessLocationSchema, type BusinessLocation } from "wiil-core-js";
|
|
113
|
+
|
|
114
|
+
const result = BusinessLocationSchema.safeParse({
|
|
115
|
+
id: "loc_downtown",
|
|
116
|
+
name: "Downtown Branch",
|
|
117
|
+
status: "ACTIVE",
|
|
118
|
+
isPrimary: true,
|
|
119
|
+
businessHours: {
|
|
120
|
+
"1": {
|
|
121
|
+
isOpen: true,
|
|
122
|
+
startTime: "09:00",
|
|
123
|
+
endTime: "17:00",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
if (result.success) {
|
|
129
|
+
const location: BusinessLocation = result.data;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Schema Conventions
|
|
134
|
+
|
|
135
|
+
- Complete resource schemas generally extend `BaseModelSchema`, which provides
|
|
136
|
+
`id`, `createdAt`, and `updatedAt`.
|
|
137
|
+
- Create schemas omit system-managed fields.
|
|
138
|
+
- Update schemas are partial create schemas with a required `id`.
|
|
139
|
+
- Public documentation examples use JSON request and response payloads.
|
|
140
|
+
- Type definitions should be read from the source schemas rather than assumed.
|
|
141
|
+
|
|
142
|
+
## Development
|
|
143
|
+
|
|
144
|
+
Install dependencies:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm install
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Build the package:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm run build
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Generate API reference documentation:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm run docs
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
There is no application server required for this package. It is a schema and
|
|
163
|
+
type-definition library.
|
|
164
|
+
|
|
165
|
+
## Repository Map
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
src/
|
|
169
|
+
index.ts Package entrypoint
|
|
170
|
+
core/ Public schema definitions
|
|
171
|
+
request/ Request and pagination utility models
|
|
172
|
+
documentation/ Public JSON examples and resource guides
|
|
173
|
+
docs/ Generated TypeDoc output
|
|
174
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Central export point for all account management schemas.
|
|
4
|
+
* @module account
|
|
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("./organization.schema"), exports);
|
|
22
|
+
__exportStar(require("./project.schema"), exports);
|
|
23
|
+
__exportStar(require("./supported-business-verticals"), exports);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceStatus, ServiceSuspensionType } from '../type-definitions';
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Organization schema definitions for account management.
|
|
5
|
+
* @module account/organization
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Zod schema for organization service status history records.
|
|
9
|
+
*
|
|
10
|
+
* Tracks all status changes for an organization over time, providing
|
|
11
|
+
* an audit trail of service state transitions.
|
|
12
|
+
*
|
|
13
|
+
* @typedef {Object} OrganizationServiceStatusRecordProperties
|
|
14
|
+
* @property {string} id - Unique identifier for the status record
|
|
15
|
+
* @property {ServiceStatus} status - Current status at the time of this record
|
|
16
|
+
* @property {ServiceStatus | null} previousStatus - Previous status before this change
|
|
17
|
+
* @property {ServiceSuspensionType | null} suspensionType - Type of suspension if status is SUSPENDED
|
|
18
|
+
* @property {number} timestamp - Unix timestamp when the status change occurred
|
|
19
|
+
* @property {string} reason - Explanation for the status change
|
|
20
|
+
* @property {string} changedBy - User ID who initiated the status change
|
|
21
|
+
* @property {boolean} isCurrent - Whether this is the current active status record (default: true)
|
|
22
|
+
* @property {number} [createdAt] - Timestamp when the record was created
|
|
23
|
+
* @property {number} [updatedAt] - Timestamp when the record was last updated
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const statusRecord: OrganizationServiceStatusRecord = {
|
|
28
|
+
* id: '123*',
|
|
29
|
+
* status: ServiceStatus.SUSPENDED,
|
|
30
|
+
* previousStatus: ServiceStatus.ACTIVE,
|
|
31
|
+
* suspensionType: ServiceSuspensionType.QUOTA_EXCEEDED,
|
|
32
|
+
* timestamp: Date.now(),
|
|
33
|
+
* reason: 'Monthly usage quota exceeded',
|
|
34
|
+
* changedBy: 'system',
|
|
35
|
+
* isCurrent: true,
|
|
36
|
+
* createdAt: Date.now(),
|
|
37
|
+
* updatedAt: Date.now()
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const OrganizationServiceStatusRecordSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
status: z.ZodEnum<typeof ServiceStatus>;
|
|
46
|
+
previousStatus: z.ZodNullable<z.ZodEnum<typeof ServiceStatus>>;
|
|
47
|
+
suspensionType: z.ZodNullable<z.ZodEnum<typeof ServiceSuspensionType>>;
|
|
48
|
+
timestamp: z.ZodNumber;
|
|
49
|
+
reason: z.ZodString;
|
|
50
|
+
changedBy: z.ZodString;
|
|
51
|
+
isCurrent: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type OrganizationServiceStatusRecord = z.infer<typeof OrganizationServiceStatusRecordSchema>;
|
|
54
|
+
/**
|
|
55
|
+
* Zod schema for organization entity.
|
|
56
|
+
*
|
|
57
|
+
* Represents a complete organization (company/business account) within the platform,
|
|
58
|
+
* including service status tracking and configuration.
|
|
59
|
+
*
|
|
60
|
+
* @typedef {Object} OrganizationProperties
|
|
61
|
+
* @property {string} id - Unique identifier for the organization
|
|
62
|
+
* @property {string} companyName - Organization's company name (minimum 2 characters)
|
|
63
|
+
* @property {SupportedBusinessVerticalId | null} [businessVerticalId] - Business industry vertical classification ID
|
|
64
|
+
* @property {Record<string, any>} [metadata] - Additional custom metadata for the organization
|
|
65
|
+
* @property {ServiceStatus} serviceStatus - Current service status (default: ACTIVE)
|
|
66
|
+
* @property {number | null} [lastServiceStatusChanged] - Timestamp of last service status change
|
|
67
|
+
* @property {OrganizationServiceStatusRecord[] | null} [serviceStatusHistory] - Complete history of service status changes
|
|
68
|
+
* @property {string | null} [platformEmail] - Organization's platform contact email
|
|
69
|
+
* @property {string | null} [primarySlug] - Primary URL slug identifier for the organization
|
|
70
|
+
* @property {string | null} [primaryWiilUrl] - Primary Wiil URL for the organization
|
|
71
|
+
* @property {string | null} [transactionsCurrency] - Default currency for transactions
|
|
72
|
+
* @property {string | null} [businessInformation] - Brief business description (max 160 characters)
|
|
73
|
+
* @property {string | null} [detailedBusinessInformation] - Detailed business description (max 1000 characters)
|
|
74
|
+
* @property {number} [createdAt] - Timestamp when the organization was created
|
|
75
|
+
* @property {number} [updatedAt] - Timestamp when the organization was last updated
|
|
76
|
+
*/
|
|
77
|
+
export declare const OrganizationSchema: z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
companyName: z.ZodString;
|
|
82
|
+
businessVerticalId: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
83
|
+
retail: "retail";
|
|
84
|
+
healthcare: "healthcare";
|
|
85
|
+
"health-wellness": "health-wellness";
|
|
86
|
+
finance: "finance";
|
|
87
|
+
"real-estate": "real-estate";
|
|
88
|
+
technology: "technology";
|
|
89
|
+
education: "education";
|
|
90
|
+
legal: "legal";
|
|
91
|
+
automotive: "automotive";
|
|
92
|
+
hospitality: "hospitality";
|
|
93
|
+
professional: "professional";
|
|
94
|
+
others: "others";
|
|
95
|
+
}>>>;
|
|
96
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
97
|
+
serviceStatus: z.ZodDefault<z.ZodEnum<typeof ServiceStatus>>;
|
|
98
|
+
lastServiceStatusChanged: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
99
|
+
serviceStatusHistory: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
status: z.ZodEnum<typeof ServiceStatus>;
|
|
104
|
+
previousStatus: z.ZodNullable<z.ZodEnum<typeof ServiceStatus>>;
|
|
105
|
+
suspensionType: z.ZodNullable<z.ZodEnum<typeof ServiceSuspensionType>>;
|
|
106
|
+
timestamp: z.ZodNumber;
|
|
107
|
+
reason: z.ZodString;
|
|
108
|
+
changedBy: z.ZodString;
|
|
109
|
+
isCurrent: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>>>>;
|
|
111
|
+
platformEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
primarySlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
primaryWiilUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
114
|
+
transactionsCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
businessInformation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
detailedBusinessInformation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type Organization = z.infer<typeof OrganizationSchema>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationSchema = exports.OrganizationServiceStatusRecordSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const type_definitions_1 = require("../type-definitions");
|
|
6
|
+
const base_schema_1 = require("../base.schema");
|
|
7
|
+
const supported_business_verticals_1 = require("./supported-business-verticals");
|
|
8
|
+
/**
|
|
9
|
+
* @fileoverview Organization schema definitions for account management.
|
|
10
|
+
* @module account/organization
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Zod schema for organization service status history records.
|
|
14
|
+
*
|
|
15
|
+
* Tracks all status changes for an organization over time, providing
|
|
16
|
+
* an audit trail of service state transitions.
|
|
17
|
+
*
|
|
18
|
+
* @typedef {Object} OrganizationServiceStatusRecordProperties
|
|
19
|
+
* @property {string} id - Unique identifier for the status record
|
|
20
|
+
* @property {ServiceStatus} status - Current status at the time of this record
|
|
21
|
+
* @property {ServiceStatus | null} previousStatus - Previous status before this change
|
|
22
|
+
* @property {ServiceSuspensionType | null} suspensionType - Type of suspension if status is SUSPENDED
|
|
23
|
+
* @property {number} timestamp - Unix timestamp when the status change occurred
|
|
24
|
+
* @property {string} reason - Explanation for the status change
|
|
25
|
+
* @property {string} changedBy - User ID who initiated the status change
|
|
26
|
+
* @property {boolean} isCurrent - Whether this is the current active status record (default: true)
|
|
27
|
+
* @property {number} [createdAt] - Timestamp when the record was created
|
|
28
|
+
* @property {number} [updatedAt] - Timestamp when the record was last updated
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const statusRecord: OrganizationServiceStatusRecord = {
|
|
33
|
+
* id: '123*',
|
|
34
|
+
* status: ServiceStatus.SUSPENDED,
|
|
35
|
+
* previousStatus: ServiceStatus.ACTIVE,
|
|
36
|
+
* suspensionType: ServiceSuspensionType.QUOTA_EXCEEDED,
|
|
37
|
+
* timestamp: Date.now(),
|
|
38
|
+
* reason: 'Monthly usage quota exceeded',
|
|
39
|
+
* changedBy: 'system',
|
|
40
|
+
* isCurrent: true,
|
|
41
|
+
* createdAt: Date.now(),
|
|
42
|
+
* updatedAt: Date.now()
|
|
43
|
+
* };
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
exports.OrganizationServiceStatusRecordSchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
47
|
+
status: zod_1.z.enum(type_definitions_1.ServiceStatus).describe("Current status at the time of this record"),
|
|
48
|
+
previousStatus: zod_1.z.enum(type_definitions_1.ServiceStatus).nullable().describe("Previous status before this change"),
|
|
49
|
+
suspensionType: zod_1.z.enum(type_definitions_1.ServiceSuspensionType).nullable().describe("Type of suspension if status is SUSPENDED"),
|
|
50
|
+
timestamp: zod_1.z.number().describe("Unix timestamp when the status change occurred"),
|
|
51
|
+
reason: zod_1.z.string().describe("Explanation for the status change"),
|
|
52
|
+
changedBy: zod_1.z.string().describe("User ID who initiated the status change"),
|
|
53
|
+
isCurrent: zod_1.z.boolean().default(true).describe("Whether this is the current active status record"),
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Zod schema for organization entity.
|
|
57
|
+
*
|
|
58
|
+
* Represents a complete organization (company/business account) within the platform,
|
|
59
|
+
* including service status tracking and configuration.
|
|
60
|
+
*
|
|
61
|
+
* @typedef {Object} OrganizationProperties
|
|
62
|
+
* @property {string} id - Unique identifier for the organization
|
|
63
|
+
* @property {string} companyName - Organization's company name (minimum 2 characters)
|
|
64
|
+
* @property {SupportedBusinessVerticalId | null} [businessVerticalId] - Business industry vertical classification ID
|
|
65
|
+
* @property {Record<string, any>} [metadata] - Additional custom metadata for the organization
|
|
66
|
+
* @property {ServiceStatus} serviceStatus - Current service status (default: ACTIVE)
|
|
67
|
+
* @property {number | null} [lastServiceStatusChanged] - Timestamp of last service status change
|
|
68
|
+
* @property {OrganizationServiceStatusRecord[] | null} [serviceStatusHistory] - Complete history of service status changes
|
|
69
|
+
* @property {string | null} [platformEmail] - Organization's platform contact email
|
|
70
|
+
* @property {string | null} [primarySlug] - Primary URL slug identifier for the organization
|
|
71
|
+
* @property {string | null} [primaryWiilUrl] - Primary Wiil URL for the organization
|
|
72
|
+
* @property {string | null} [transactionsCurrency] - Default currency for transactions
|
|
73
|
+
* @property {string | null} [businessInformation] - Brief business description (max 160 characters)
|
|
74
|
+
* @property {string | null} [detailedBusinessInformation] - Detailed business description (max 1000 characters)
|
|
75
|
+
* @property {number} [createdAt] - Timestamp when the organization was created
|
|
76
|
+
* @property {number} [updatedAt] - Timestamp when the organization was last updated
|
|
77
|
+
*/
|
|
78
|
+
exports.OrganizationSchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
79
|
+
companyName: zod_1.z.string().min(2).describe("Organization's company name (minimum 2 characters)"),
|
|
80
|
+
businessVerticalId: zod_1.z.enum(supported_business_verticals_1.SUPPORTED_BUSINESS_VERTICALS).nullable().optional().describe("Business industry vertical classification ID (healthcare, retail, technology, etc.)"),
|
|
81
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional().describe("Additional custom metadata for the organization"),
|
|
82
|
+
serviceStatus: zod_1.z.enum(type_definitions_1.ServiceStatus).default(type_definitions_1.ServiceStatus.ACTIVE).describe("Current service status of the organization"),
|
|
83
|
+
lastServiceStatusChanged: zod_1.z.number().nullable().optional().describe("Timestamp of last service status change"),
|
|
84
|
+
serviceStatusHistory: zod_1.z.array(exports.OrganizationServiceStatusRecordSchema).nullable().optional().describe("Complete history of service status changes"),
|
|
85
|
+
platformEmail: zod_1.z.string().nullable().optional().describe("Organization's platform contact email"),
|
|
86
|
+
primarySlug: zod_1.z.string().nullable().optional().describe("Primary URL slug identifier for the organization"),
|
|
87
|
+
primaryWiilUrl: zod_1.z.url().nullable().optional().describe("Primary Wiil URL for the organization"),
|
|
88
|
+
transactionsCurrency: zod_1.z.string().nullable().optional().describe("Default currency for transactions"),
|
|
89
|
+
businessInformation: zod_1.z.string().max(160).nullable().optional().describe("Brief business description (max 160 characters)"),
|
|
90
|
+
detailedBusinessInformation: zod_1.z.string().max(1000).nullable().optional().describe("Detailed business description (max 1000 characters)"),
|
|
91
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceStatus } from '../type-definitions';
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Project schema definitions for account management.
|
|
5
|
+
* @module account/project
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Zod schema for project entity.
|
|
9
|
+
*
|
|
10
|
+
* Represents a project within an organization. Projects are used to organize
|
|
11
|
+
* resources, deployments, and configurations within an organizational context.
|
|
12
|
+
*
|
|
13
|
+
* @typedef {Object} ProjectProperties
|
|
14
|
+
* @property {string} id - Unique identifier for the project
|
|
15
|
+
* @property {string} name - Project name (minimum 2 characters)
|
|
16
|
+
* @property {string | undefined} [regionId] - Geographic region ID for this project (optional, can inherit from organization)
|
|
17
|
+
* @property {string} [description] - Optional description of the project's purpose
|
|
18
|
+
* @property {string[]} [compliance] - Optional array of compliance standards this project adheres to
|
|
19
|
+
* @property {boolean} isDefault - Whether this is the default project for the organization
|
|
20
|
+
* @property {ServiceStatus} serviceStatus - Current service status (default: ACTIVE)
|
|
21
|
+
* @property {Record<string, any>} [metadata] - Additional custom metadata for the project
|
|
22
|
+
* @property {number} [createdAt] - Timestamp when the project was created
|
|
23
|
+
* @property {number} [updatedAt] - Timestamp when the project was last updated
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const project: Project = {
|
|
28
|
+
* id: '123*',
|
|
29
|
+
* name: 'Production Environment',
|
|
30
|
+
* regionId: 'us-west-2',
|
|
31
|
+
* description: 'Main production deployment project',
|
|
32
|
+
* compliance: ['SOC2', 'HIPAA'],
|
|
33
|
+
* isDefault: true,
|
|
34
|
+
* serviceStatus: ServiceStatus.ACTIVE,
|
|
35
|
+
* metadata: { environment: 'production' },
|
|
36
|
+
* createdAt: Date.now(),
|
|
37
|
+
* updatedAt: Date.now()
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const ProjectSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
47
|
+
description: z.ZodOptional<z.ZodString>;
|
|
48
|
+
compliance: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
isDefault: z.ZodBoolean;
|
|
50
|
+
serviceStatus: z.ZodDefault<z.ZodEnum<typeof ServiceStatus>>;
|
|
51
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/**
|
|
54
|
+
* Zod schema for creating a new project.
|
|
55
|
+
*
|
|
56
|
+
* Omits auto-generated fields (id, timestamps) and system-managed fields (isDefault)
|
|
57
|
+
* that are populated by the system.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Use this schema when creating new projects within an organization.
|
|
61
|
+
* All required fields must be provided.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const newProject: CreateProject = {
|
|
66
|
+
* name: 'Development Environment',
|
|
67
|
+
* regionId: 'us-east-1',
|
|
68
|
+
* description: 'Development and testing project',
|
|
69
|
+
* compliance: ['SOC2'],
|
|
70
|
+
* serviceStatus: ServiceStatus.ACTIVE,
|
|
71
|
+
* metadata: { environment: 'development' }
|
|
72
|
+
* };
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare const CreateProjectSchema: z.ZodObject<{
|
|
76
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
77
|
+
serviceStatus: z.ZodDefault<z.ZodEnum<typeof ServiceStatus>>;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
regionId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
description: z.ZodOptional<z.ZodString>;
|
|
81
|
+
compliance: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
/**
|
|
84
|
+
* Zod schema for updating an existing project.
|
|
85
|
+
*
|
|
86
|
+
* All fields are optional (partial) except id, which is required to identify the project.
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* Supports partial updates - only include the fields you want to modify.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const updateProject: UpdateProject = {
|
|
94
|
+
* id: '123*',
|
|
95
|
+
* name: 'Production Environment v2',
|
|
96
|
+
* description: 'Updated production deployment',
|
|
97
|
+
* hasRate: true
|
|
98
|
+
* };
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare const UpdateProjectSchema: z.ZodObject<{
|
|
102
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
103
|
+
serviceStatus: z.ZodOptional<z.ZodDefault<z.ZodEnum<typeof ServiceStatus>>>;
|
|
104
|
+
name: z.ZodOptional<z.ZodString>;
|
|
105
|
+
regionId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
106
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
107
|
+
compliance: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
/**
|
|
111
|
+
* Type definition for a complete project entity.
|
|
112
|
+
*/
|
|
113
|
+
export type Project = z.infer<typeof ProjectSchema>;
|
|
114
|
+
/**
|
|
115
|
+
* Type definition for creating a new project.
|
|
116
|
+
*/
|
|
117
|
+
export type CreateProject = z.infer<typeof CreateProjectSchema>;
|
|
118
|
+
/**
|
|
119
|
+
* Type definition for updating an existing project.
|
|
120
|
+
*/
|
|
121
|
+
export type UpdateProject = z.infer<typeof UpdateProjectSchema>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateProjectSchema = exports.CreateProjectSchema = exports.ProjectSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const base_schema_1 = require("../base.schema");
|
|
6
|
+
const type_definitions_1 = require("../type-definitions");
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Project schema definitions for account management.
|
|
9
|
+
* @module account/project
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Zod schema for project entity.
|
|
13
|
+
*
|
|
14
|
+
* Represents a project within an organization. Projects are used to organize
|
|
15
|
+
* resources, deployments, and configurations within an organizational context.
|
|
16
|
+
*
|
|
17
|
+
* @typedef {Object} ProjectProperties
|
|
18
|
+
* @property {string} id - Unique identifier for the project
|
|
19
|
+
* @property {string} name - Project name (minimum 2 characters)
|
|
20
|
+
* @property {string | undefined} [regionId] - Geographic region ID for this project (optional, can inherit from organization)
|
|
21
|
+
* @property {string} [description] - Optional description of the project's purpose
|
|
22
|
+
* @property {string[]} [compliance] - Optional array of compliance standards this project adheres to
|
|
23
|
+
* @property {boolean} isDefault - Whether this is the default project for the organization
|
|
24
|
+
* @property {ServiceStatus} serviceStatus - Current service status (default: ACTIVE)
|
|
25
|
+
* @property {Record<string, any>} [metadata] - Additional custom metadata for the project
|
|
26
|
+
* @property {number} [createdAt] - Timestamp when the project was created
|
|
27
|
+
* @property {number} [updatedAt] - Timestamp when the project was last updated
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const project: Project = {
|
|
32
|
+
* id: '123*',
|
|
33
|
+
* name: 'Production Environment',
|
|
34
|
+
* regionId: 'us-west-2',
|
|
35
|
+
* description: 'Main production deployment project',
|
|
36
|
+
* compliance: ['SOC2', 'HIPAA'],
|
|
37
|
+
* isDefault: true,
|
|
38
|
+
* serviceStatus: ServiceStatus.ACTIVE,
|
|
39
|
+
* metadata: { environment: 'production' },
|
|
40
|
+
* createdAt: Date.now(),
|
|
41
|
+
* updatedAt: Date.now()
|
|
42
|
+
* };
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
exports.ProjectSchema = base_schema_1.BaseModelSchema.safeExtend({
|
|
46
|
+
name: zod_1.z.string().min(2).describe("Project name (minimum 2 characters)"),
|
|
47
|
+
regionId: zod_1.z.string().optional().describe("Geographic region ID for this project (optional, can inherit from organization)"),
|
|
48
|
+
description: zod_1.z.string().optional().describe("Optional description of the project's purpose"),
|
|
49
|
+
compliance: zod_1.z.string().array().optional().describe("Array of compliance standards this project adheres to (e.g., SOC2, HIPAA)"),
|
|
50
|
+
isDefault: zod_1.z.boolean().describe("Whether this is the default project for the organization (system-managed flag, set automatically on creation)"),
|
|
51
|
+
serviceStatus: zod_1.z.enum(type_definitions_1.ServiceStatus).default(type_definitions_1.ServiceStatus.ACTIVE).describe("Current service status of the project"),
|
|
52
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional().describe("Additional custom metadata for the project"),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Zod schema for creating a new project.
|
|
56
|
+
*
|
|
57
|
+
* Omits auto-generated fields (id, timestamps) and system-managed fields (isDefault)
|
|
58
|
+
* that are populated by the system.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Use this schema when creating new projects within an organization.
|
|
62
|
+
* All required fields must be provided.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const newProject: CreateProject = {
|
|
67
|
+
* name: 'Development Environment',
|
|
68
|
+
* regionId: 'us-east-1',
|
|
69
|
+
* description: 'Development and testing project',
|
|
70
|
+
* compliance: ['SOC2'],
|
|
71
|
+
* serviceStatus: ServiceStatus.ACTIVE,
|
|
72
|
+
* metadata: { environment: 'development' }
|
|
73
|
+
* };
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
exports.CreateProjectSchema = exports.ProjectSchema.omit({
|
|
77
|
+
id: true,
|
|
78
|
+
createdAt: true,
|
|
79
|
+
updatedAt: true,
|
|
80
|
+
isDefault: true,
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* Zod schema for updating an existing project.
|
|
84
|
+
*
|
|
85
|
+
* All fields are optional (partial) except id, which is required to identify the project.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Supports partial updates - only include the fields you want to modify.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const updateProject: UpdateProject = {
|
|
93
|
+
* id: '123*',
|
|
94
|
+
* name: 'Production Environment v2',
|
|
95
|
+
* description: 'Updated production deployment',
|
|
96
|
+
* hasRate: true
|
|
97
|
+
* };
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
exports.UpdateProjectSchema = exports.CreateProjectSchema.partial().safeExtend({
|
|
101
|
+
id: zod_1.z.string(),
|
|
102
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported Business Vertical IDs
|
|
3
|
+
*
|
|
4
|
+
* This file contains only the business vertical IDs extracted from
|
|
5
|
+
* business-verticals-definitions.ts for use in validation and type checking.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SUPPORTED_BUSINESS_VERTICALS: readonly ["healthcare", "health-wellness", "retail", "finance", "real-estate", "technology", "education", "legal", "automotive", "hospitality", "professional", "others"];
|
|
8
|
+
export type SupportedBusinessVerticalId = typeof SUPPORTED_BUSINESS_VERTICALS[number];
|