@dainamite/cpq 0.2.2
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/CHANGELOG.md +70 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +236 -0
- package/README.md +108 -0
- package/dist/modules/cpq/acl.js +30 -0
- package/dist/modules/cpq/acl.js.map +7 -0
- package/dist/modules/cpq/api/_helpers/handleArcError.js +37 -0
- package/dist/modules/cpq/api/_helpers/handleArcError.js.map +7 -0
- package/dist/modules/cpq/api/attribute-options/route.js +47 -0
- package/dist/modules/cpq/api/attribute-options/route.js.map +7 -0
- package/dist/modules/cpq/api/bundle-slots/route.js +101 -0
- package/dist/modules/cpq/api/bundle-slots/route.js.map +7 -0
- package/dist/modules/cpq/api/bundle-tree/route.js +28 -0
- package/dist/modules/cpq/api/bundle-tree/route.js.map +7 -0
- package/dist/modules/cpq/api/context.js +29 -0
- package/dist/modules/cpq/api/context.js.map +7 -0
- package/dist/modules/cpq/api/inventory/assets/route.js +113 -0
- package/dist/modules/cpq/api/inventory/assets/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/assets/status/route.js +35 -0
- package/dist/modules/cpq/api/inventory/assets/status/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/customer/[customerId]/parent-items/route.js +30 -0
- package/dist/modules/cpq/api/inventory/customer/[customerId]/parent-items/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/customer/[customerId]/route.js +31 -0
- package/dist/modules/cpq/api/inventory/customer/[customerId]/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/subscription-items/route.js +99 -0
- package/dist/modules/cpq/api/inventory/subscription-items/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/subscriptions/[subscriptionId]/change-log/route.js +57 -0
- package/dist/modules/cpq/api/inventory/subscriptions/[subscriptionId]/change-log/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/subscriptions/expiring/route.js +62 -0
- package/dist/modules/cpq/api/inventory/subscriptions/expiring/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/subscriptions/route.js +116 -0
- package/dist/modules/cpq/api/inventory/subscriptions/route.js.map +7 -0
- package/dist/modules/cpq/api/inventory/subscriptions/status/route.js +35 -0
- package/dist/modules/cpq/api/inventory/subscriptions/status/route.js.map +7 -0
- package/dist/modules/cpq/api/offering-components/route.js +91 -0
- package/dist/modules/cpq/api/offering-components/route.js.map +7 -0
- package/dist/modules/cpq/api/orders/[orderId]/activate/route.js +39 -0
- package/dist/modules/cpq/api/orders/[orderId]/activate/route.js.map +7 -0
- package/dist/modules/cpq/api/orders/[orderId]/route.js +28 -0
- package/dist/modules/cpq/api/orders/[orderId]/route.js.map +7 -0
- package/dist/modules/cpq/api/orders/[orderId]/status/route.js +38 -0
- package/dist/modules/cpq/api/orders/[orderId]/status/route.js.map +7 -0
- package/dist/modules/cpq/api/orders/route.js +71 -0
- package/dist/modules/cpq/api/orders/route.js.map +7 -0
- package/dist/modules/cpq/api/price-rules/route.js +180 -0
- package/dist/modules/cpq/api/price-rules/route.js.map +7 -0
- package/dist/modules/cpq/api/pricing-table-entries/route.js +142 -0
- package/dist/modules/cpq/api/pricing-table-entries/route.js.map +7 -0
- package/dist/modules/cpq/api/pricing-tables/route.js +179 -0
- package/dist/modules/cpq/api/pricing-tables/route.js.map +7 -0
- package/dist/modules/cpq/api/product-attributes/route.js +160 -0
- package/dist/modules/cpq/api/product-attributes/route.js.map +7 -0
- package/dist/modules/cpq/api/product-charges/route.js +166 -0
- package/dist/modules/cpq/api/product-charges/route.js.map +7 -0
- package/dist/modules/cpq/api/product-offerings/route.js +294 -0
- package/dist/modules/cpq/api/product-offerings/route.js.map +7 -0
- package/dist/modules/cpq/api/product-relationships/route.js +144 -0
- package/dist/modules/cpq/api/product-relationships/route.js.map +7 -0
- package/dist/modules/cpq/api/product-specifications/route.js +292 -0
- package/dist/modules/cpq/api/product-specifications/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/cancel-meta/route.js +71 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/cancel-meta/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/clone/route.js +29 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/clone/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.js +54 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/route.js +27 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/merge-meta/route.js +72 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/merge-meta/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/recalculate/route.js +35 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/recalculate/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/route.js +102 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/status/route.js +27 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/status/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/target-subscriptions/[targetId]/route.js +79 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/target-subscriptions/[targetId]/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/target-subscriptions/route.js +95 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/target-subscriptions/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/attributes/route.js +52 -0
- package/dist/modules/cpq/api/quotes/attributes/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/from-subscription/route.js +72 -0
- package/dist/modules/cpq/api/quotes/from-subscription/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/price/route.js +69 -0
- package/dist/modules/cpq/api/quotes/price/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/route.js +97 -0
- package/dist/modules/cpq/api/quotes/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/validate-relationships/route.js +86 -0
- package/dist/modules/cpq/api/quotes/validate-relationships/route.js.map +7 -0
- package/dist/modules/cpq/api/resolveQuotingService.js +7 -0
- package/dist/modules/cpq/api/resolveQuotingService.js.map +7 -0
- package/dist/modules/cpq/api/wizards/resolve/route.js +38 -0
- package/dist/modules/cpq/api/wizards/resolve/route.js.map +7 -0
- package/dist/modules/cpq/api/wizards/route.js +111 -0
- package/dist/modules/cpq/api/wizards/route.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/AssetsTable.js +136 -0
- package/dist/modules/cpq/backend/cpq/inventory/AssetsTable.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/SubscriptionsTable.js +185 -0
- package/dist/modules/cpq/backend/cpq/inventory/SubscriptionsTable.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.js +343 -0
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.js +13 -0
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/page.js +35 -0
- package/dist/modules/cpq/backend/cpq/inventory/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/inventory/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/shared.js +20 -0
- package/dist/modules/cpq/backend/cpq/inventory/shared.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.js +794 -0
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.js +13 -0
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/offerings/[id]/page.js +917 -0
- package/dist/modules/cpq/backend/cpq/offerings/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/offerings/page.js +405 -0
- package/dist/modules/cpq/backend/cpq/offerings/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/offerings/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/offerings/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/orders/[id]/page.js +677 -0
- package/dist/modules/cpq/backend/cpq/orders/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/orders/page.js +134 -0
- package/dist/modules/cpq/backend/cpq/orders/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/orders/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/orders/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/price-rules/PriceRuleForm.js +272 -0
- package/dist/modules/cpq/backend/cpq/price-rules/PriceRuleForm.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.js +407 -0
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.meta.js +13 -0
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/price-rules/page.js +211 -0
- package/dist/modules/cpq/backend/cpq/price-rules/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/price-rules/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/price-rules/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.js +275 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.js +112 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/page.js +492 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxExport.js +50 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxExport.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.js +249 -0
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/page.js +87 -0
- package/dist/modules/cpq/backend/cpq/pricing/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/pricing/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/pricing/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.js +652 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/page.js +1289 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/page.js +283 -0
- package/dist/modules/cpq/backend/cpq/quotes/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/quotes/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.js +214 -0
- package/dist/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/specifications/[id]/page.js +1399 -0
- package/dist/modules/cpq/backend/cpq/specifications/[id]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/specifications/page.js +148 -0
- package/dist/modules/cpq/backend/cpq/specifications/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/specifications/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/specifications/page.meta.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.js +204 -0
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/page.js +191 -0
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/wizards/page.js +119 -0
- package/dist/modules/cpq/backend/cpq/wizards/page.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/wizards/page.meta.js +18 -0
- package/dist/modules/cpq/backend/cpq/wizards/page.meta.js.map +7 -0
- package/dist/modules/cpq/ce.js +151 -0
- package/dist/modules/cpq/ce.js.map +7 -0
- package/dist/modules/cpq/cli.js +11 -0
- package/dist/modules/cpq/cli.js.map +7 -0
- package/dist/modules/cpq/components/CpqListView.js +265 -0
- package/dist/modules/cpq/components/CpqListView.js.map +7 -0
- package/dist/modules/cpq/components/NumberInput.js +95 -0
- package/dist/modules/cpq/components/NumberInput.js.map +7 -0
- package/dist/modules/cpq/components/StatusPath.js +60 -0
- package/dist/modules/cpq/components/StatusPath.js.map +7 -0
- package/dist/modules/cpq/components/statusMaps.js +66 -0
- package/dist/modules/cpq/components/statusMaps.js.map +7 -0
- package/dist/modules/cpq/components/useCpqRowActions.js +125 -0
- package/dist/modules/cpq/components/useCpqRowActions.js.map +7 -0
- package/dist/modules/cpq/data/entities.js +1556 -0
- package/dist/modules/cpq/data/entities.js.map +7 -0
- package/dist/modules/cpq/data/validators.js +575 -0
- package/dist/modules/cpq/data/validators.js.map +7 -0
- package/dist/modules/cpq/di.js +57 -0
- package/dist/modules/cpq/di.js.map +7 -0
- package/dist/modules/cpq/events.js +50 -0
- package/dist/modules/cpq/events.js.map +7 -0
- package/dist/modules/cpq/index.js +16 -0
- package/dist/modules/cpq/index.js.map +7 -0
- package/dist/modules/cpq/lib/seeds/api.js +32 -0
- package/dist/modules/cpq/lib/seeds/api.js.map +7 -0
- package/dist/modules/cpq/lib/seeds/tenant-provisioning.js +158 -0
- package/dist/modules/cpq/lib/seeds/tenant-provisioning.js.map +7 -0
- package/dist/modules/cpq/lib/seeds.js +6 -0
- package/dist/modules/cpq/lib/seeds.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260220220000_cpq.js +40 -0
- package/dist/modules/cpq/migrations/Migration20260220220000_cpq.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260330000000_cpq_product_domain.js +54 -0
- package/dist/modules/cpq/migrations/Migration20260330000000_cpq_product_domain.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260331000000_cpq_charge_unique_per_offering.js +15 -0
- package/dist/modules/cpq/migrations/Migration20260331000000_cpq_charge_unique_per_offering.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260401000000_cpq_quoting_v2.js +62 -0
- package/dist/modules/cpq/migrations/Migration20260401000000_cpq_quoting_v2.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260402000000_cpq_workflows.js +56 -0
- package/dist/modules/cpq/migrations/Migration20260402000000_cpq_workflows.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260407000000_cpq_pricing_tables_v2.js +26 -0
- package/dist/modules/cpq/migrations/Migration20260407000000_cpq_pricing_tables_v2.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260407100000_cpq_price_rules.js +37 -0
- package/dist/modules/cpq/migrations/Migration20260407100000_cpq_price_rules.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260408000000_cpq_price_rules.js +35 -0
- package/dist/modules/cpq/migrations/Migration20260408000000_cpq_price_rules.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260410000000_cpq_drop_datacentres_inventory.js +21 -0
- package/dist/modules/cpq/migrations/Migration20260410000000_cpq_drop_datacentres_inventory.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260410000000_cpq_wizard_rename.js +46 -0
- package/dist/modules/cpq/migrations/Migration20260410000000_cpq_wizard_rename.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260410100000_cpq_inventory.js +118 -0
- package/dist/modules/cpq/migrations/Migration20260410100000_cpq_inventory.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260411000000_cpq_orders.js +63 -0
- package/dist/modules/cpq/migrations/Migration20260411000000_cpq_orders.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260412000000_cpq_bundled_offerings.js +28 -0
- package/dist/modules/cpq/migrations/Migration20260412000000_cpq_bundled_offerings.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260504064621_cpq_arc.js +36 -0
- package/dist/modules/cpq/migrations/Migration20260504064621_cpq_arc.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260514000000_cpq_spec_merge_retired_deprecated.js +14 -0
- package/dist/modules/cpq/migrations/Migration20260514000000_cpq_spec_merge_retired_deprecated.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260514100000_cpq_offering_merge_retired_deprecated.js +14 -0
- package/dist/modules/cpq/migrations/Migration20260514100000_cpq_offering_merge_retired_deprecated.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260514110000_cpq_list_search_indexes.js +58 -0
- package/dist/modules/cpq/migrations/Migration20260514110000_cpq_list_search_indexes.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20260515000000_cpq_inventory_subscriptions_search_indexes.js +29 -0
- package/dist/modules/cpq/migrations/Migration20260515000000_cpq_inventory_subscriptions_search_indexes.js.map +7 -0
- package/dist/modules/cpq/services/cpqBundleService.js +447 -0
- package/dist/modules/cpq/services/cpqBundleService.js.map +7 -0
- package/dist/modules/cpq/services/cpqInventoryService.js +1371 -0
- package/dist/modules/cpq/services/cpqInventoryService.js.map +7 -0
- package/dist/modules/cpq/services/cpqOrderService.js +901 -0
- package/dist/modules/cpq/services/cpqOrderService.js.map +7 -0
- package/dist/modules/cpq/services/cpqPricingService.js +289 -0
- package/dist/modules/cpq/services/cpqPricingService.js.map +7 -0
- package/dist/modules/cpq/services/cpqProductService.js +204 -0
- package/dist/modules/cpq/services/cpqProductService.js.map +7 -0
- package/dist/modules/cpq/services/cpqQuotingService.js +1867 -0
- package/dist/modules/cpq/services/cpqQuotingService.js.map +7 -0
- package/dist/modules/cpq/services/cpqValidationService.js +234 -0
- package/dist/modules/cpq/services/cpqValidationService.js.map +7 -0
- package/dist/modules/cpq/services/cpqWizardService.js +137 -0
- package/dist/modules/cpq/services/cpqWizardService.js.map +7 -0
- package/dist/modules/cpq/services/types.js +114 -0
- package/dist/modules/cpq/services/types.js.map +7 -0
- package/dist/modules/cpq/setup.js +49 -0
- package/dist/modules/cpq/setup.js.map +7 -0
- package/dist/modules/cpq/subscribers/subscription-amended-log.js +18 -0
- package/dist/modules/cpq/subscribers/subscription-amended-log.js.map +7 -0
- package/dist/modules/cpq/subscribers/subscription-cancelled-log.js +19 -0
- package/dist/modules/cpq/subscribers/subscription-cancelled-log.js.map +7 -0
- package/dist/modules/cpq/subscribers/subscription-merged-log.js +20 -0
- package/dist/modules/cpq/subscribers/subscription-merged-log.js.map +7 -0
- package/dist/modules/cpq/subscribers/subscription-renewed-log.js +18 -0
- package/dist/modules/cpq/subscribers/subscription-renewed-log.js.map +7 -0
- package/dist/modules/cpq/subscribers/subscription-superseded-log.js +18 -0
- package/dist/modules/cpq/subscribers/subscription-superseded-log.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.client.js +192 -0
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.client.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.js +17 -0
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.client.js +79 -0
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.client.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.js +17 -0
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.client.js +181 -0
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.client.js.map +7 -0
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.js +17 -0
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.js.map +7 -0
- package/dist/modules/cpq/widgets/injection-table.js +44 -0
- package/dist/modules/cpq/widgets/injection-table.js.map +7 -0
- package/dist/modules/cpq/workflows/WizardRunner.js +113 -0
- package/dist/modules/cpq/workflows/WizardRunner.js.map +7 -0
- package/dist/modules/cpq/workflows/WizardTrigger.js +116 -0
- package/dist/modules/cpq/workflows/WizardTrigger.js.map +7 -0
- package/dist/modules/cpq/workflows/engine.js +188 -0
- package/dist/modules/cpq/workflows/engine.js.map +7 -0
- package/dist/modules/cpq/workflows/registry.js +16 -0
- package/dist/modules/cpq/workflows/registry.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/CustomerSelectStep.js +119 -0
- package/dist/modules/cpq/workflows/steps/CustomerSelectStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/InventorySelectStep.js +24 -0
- package/dist/modules/cpq/workflows/steps/InventorySelectStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/ItemListStep.js +115 -0
- package/dist/modules/cpq/workflows/steps/ItemListStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/OfferingSelectStep.js +327 -0
- package/dist/modules/cpq/workflows/steps/OfferingSelectStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/ProductConfigureStep.js +231 -0
- package/dist/modules/cpq/workflows/steps/ProductConfigureStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/ReviewStep.js +152 -0
- package/dist/modules/cpq/workflows/steps/ReviewStep.js.map +7 -0
- package/dist/modules/cpq/workflows/steps/index.js +49 -0
- package/dist/modules/cpq/workflows/steps/index.js.map +7 -0
- package/dist/modules/cpq/workflows/types.js +1 -0
- package/dist/modules/cpq/workflows/types.js.map +7 -0
- package/package.json +150 -0
- package/src/modules/cpq/__integration__/TC-CPQ-001.spec.ts +177 -0
- package/src/modules/cpq/__integration__/TC-CPQ-002.spec.ts +123 -0
- package/src/modules/cpq/__integration__/TC-CPQ-003.spec.ts +115 -0
- package/src/modules/cpq/__integration__/TC-CPQ-004.spec.ts +184 -0
- package/src/modules/cpq/__integration__/TC-CPQ-005.spec.ts +43 -0
- package/src/modules/cpq/__integration__/TC-CPQ-006.spec.ts +87 -0
- package/src/modules/cpq/__integration__/TC-CPQ-007.spec.ts +79 -0
- package/src/modules/cpq/__integration__/TC-CPQ-008.spec.ts +55 -0
- package/src/modules/cpq/__integration__/TC-CPQ-009.spec.ts +45 -0
- package/src/modules/cpq/__integration__/TC-CPQ-010.spec.ts +54 -0
- package/src/modules/cpq/__integration__/TC-CPQ-011.spec.ts +24 -0
- package/src/modules/cpq/__integration__/TC-CPQ-012.spec.ts +62 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-001.spec.ts +52 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-002.spec.ts +65 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-003.spec.ts +107 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-004.spec.ts +74 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-005.spec.ts +86 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-006.spec.ts +79 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-007.spec.ts +63 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-008.spec.ts +62 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-009.spec.ts +62 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-010.spec.ts +59 -0
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-011.spec.ts +128 -0
- package/src/modules/cpq/__integration__/_helpers/cpqArcFixtures.ts +208 -0
- package/src/modules/cpq/__tests__/package-isolation.test.ts +232 -0
- package/src/modules/cpq/acl.ts +26 -0
- package/src/modules/cpq/api/_helpers/__tests__/handleArcError.test.ts +117 -0
- package/src/modules/cpq/api/_helpers/handleArcError.ts +81 -0
- package/src/modules/cpq/api/attribute-options/route.ts +55 -0
- package/src/modules/cpq/api/bundle-slots/route.ts +112 -0
- package/src/modules/cpq/api/bundle-tree/route.ts +31 -0
- package/src/modules/cpq/api/context.ts +39 -0
- package/src/modules/cpq/api/inventory/assets/route.ts +123 -0
- package/src/modules/cpq/api/inventory/assets/status/route.ts +34 -0
- package/src/modules/cpq/api/inventory/customer/[customerId]/parent-items/route.ts +30 -0
- package/src/modules/cpq/api/inventory/customer/[customerId]/route.ts +31 -0
- package/src/modules/cpq/api/inventory/subscription-items/route.ts +107 -0
- package/src/modules/cpq/api/inventory/subscriptions/[subscriptionId]/change-log/route.ts +64 -0
- package/src/modules/cpq/api/inventory/subscriptions/expiring/route.ts +66 -0
- package/src/modules/cpq/api/inventory/subscriptions/route.ts +126 -0
- package/src/modules/cpq/api/inventory/subscriptions/status/route.ts +34 -0
- package/src/modules/cpq/api/offering-components/route.ts +103 -0
- package/src/modules/cpq/api/orders/[orderId]/activate/route.ts +48 -0
- package/src/modules/cpq/api/orders/[orderId]/route.ts +28 -0
- package/src/modules/cpq/api/orders/[orderId]/status/route.ts +38 -0
- package/src/modules/cpq/api/orders/route.ts +77 -0
- package/src/modules/cpq/api/price-rules/route.ts +210 -0
- package/src/modules/cpq/api/pricing-table-entries/route.ts +159 -0
- package/src/modules/cpq/api/pricing-tables/route.ts +202 -0
- package/src/modules/cpq/api/product-attributes/route.ts +175 -0
- package/src/modules/cpq/api/product-charges/route.ts +181 -0
- package/src/modules/cpq/api/product-offerings/route.ts +329 -0
- package/src/modules/cpq/api/product-relationships/route.ts +156 -0
- package/src/modules/cpq/api/product-specifications/route.ts +325 -0
- package/src/modules/cpq/api/quotes/[quoteId]/cancel-meta/route.ts +77 -0
- package/src/modules/cpq/api/quotes/[quoteId]/clone/route.ts +28 -0
- package/src/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.ts +55 -0
- package/src/modules/cpq/api/quotes/[quoteId]/items/route.ts +26 -0
- package/src/modules/cpq/api/quotes/[quoteId]/merge-meta/route.ts +78 -0
- package/src/modules/cpq/api/quotes/[quoteId]/recalculate/route.ts +34 -0
- package/src/modules/cpq/api/quotes/[quoteId]/route.ts +109 -0
- package/src/modules/cpq/api/quotes/[quoteId]/status/route.ts +26 -0
- package/src/modules/cpq/api/quotes/[quoteId]/target-subscriptions/[targetId]/route.ts +91 -0
- package/src/modules/cpq/api/quotes/[quoteId]/target-subscriptions/route.ts +107 -0
- package/src/modules/cpq/api/quotes/attributes/route.ts +61 -0
- package/src/modules/cpq/api/quotes/from-subscription/route.ts +85 -0
- package/src/modules/cpq/api/quotes/price/route.ts +81 -0
- package/src/modules/cpq/api/quotes/route.ts +114 -0
- package/src/modules/cpq/api/quotes/validate-relationships/route.ts +100 -0
- package/src/modules/cpq/api/resolveQuotingService.ts +11 -0
- package/src/modules/cpq/api/wizards/resolve/route.ts +39 -0
- package/src/modules/cpq/api/wizards/route.ts +127 -0
- package/src/modules/cpq/backend/cpq/inventory/AssetsTable.tsx +166 -0
- package/src/modules/cpq/backend/cpq/inventory/SubscriptionsTable.tsx +251 -0
- package/src/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.ts +9 -0
- package/src/modules/cpq/backend/cpq/inventory/assets/[id]/page.tsx +440 -0
- package/src/modules/cpq/backend/cpq/inventory/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/inventory/page.tsx +49 -0
- package/src/modules/cpq/backend/cpq/inventory/shared.tsx +32 -0
- package/src/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.ts +9 -0
- package/src/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.tsx +1085 -0
- package/src/modules/cpq/backend/cpq/offerings/[id]/page.tsx +1165 -0
- package/src/modules/cpq/backend/cpq/offerings/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/offerings/page.tsx +468 -0
- package/src/modules/cpq/backend/cpq/orders/[id]/page.tsx +921 -0
- package/src/modules/cpq/backend/cpq/orders/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/orders/page.tsx +182 -0
- package/src/modules/cpq/backend/cpq/price-rules/PriceRuleForm.tsx +310 -0
- package/src/modules/cpq/backend/cpq/price-rules/[id]/page.meta.ts +9 -0
- package/src/modules/cpq/backend/cpq/price-rules/[id]/page.tsx +472 -0
- package/src/modules/cpq/backend/cpq/price-rules/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/price-rules/page.tsx +253 -0
- package/src/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.tsx +431 -0
- package/src/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.tsx +122 -0
- package/src/modules/cpq/backend/cpq/pricing/[id]/page.tsx +588 -0
- package/src/modules/cpq/backend/cpq/pricing/[id]/xlsxExport.ts +90 -0
- package/src/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.ts +338 -0
- package/src/modules/cpq/backend/cpq/pricing/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/pricing/page.tsx +111 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.tsx +737 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/page.tsx +1721 -0
- package/src/modules/cpq/backend/cpq/quotes/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/quotes/page.tsx +370 -0
- package/src/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.tsx +300 -0
- package/src/modules/cpq/backend/cpq/specifications/[id]/page.tsx +1722 -0
- package/src/modules/cpq/backend/cpq/specifications/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/specifications/page.tsx +191 -0
- package/src/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.tsx +319 -0
- package/src/modules/cpq/backend/cpq/wizards/[definitionCode]/page.tsx +234 -0
- package/src/modules/cpq/backend/cpq/wizards/page.meta.ts +16 -0
- package/src/modules/cpq/backend/cpq/wizards/page.tsx +141 -0
- package/src/modules/cpq/ce.ts +150 -0
- package/src/modules/cpq/cli.ts +10 -0
- package/src/modules/cpq/components/CpqListView.tsx +431 -0
- package/src/modules/cpq/components/NumberInput.tsx +166 -0
- package/src/modules/cpq/components/StatusPath.tsx +116 -0
- package/src/modules/cpq/components/statusMaps.ts +148 -0
- package/src/modules/cpq/components/useCpqRowActions.tsx +183 -0
- package/src/modules/cpq/data/__tests__/validators.arc.test.ts +271 -0
- package/src/modules/cpq/data/__tests__/validators.test.ts +782 -0
- package/src/modules/cpq/data/entities.ts +1467 -0
- package/src/modules/cpq/data/validators.ts +663 -0
- package/src/modules/cpq/di.ts +70 -0
- package/src/modules/cpq/events.ts +62 -0
- package/src/modules/cpq/index.ts +15 -0
- package/src/modules/cpq/lib/seeds/__tests__/api.test.ts +86 -0
- package/src/modules/cpq/lib/seeds/__tests__/tenant-provisioning.test.ts +349 -0
- package/src/modules/cpq/lib/seeds/api.ts +119 -0
- package/src/modules/cpq/lib/seeds/tenant-provisioning.ts +239 -0
- package/src/modules/cpq/lib/seeds.ts +18 -0
- package/src/modules/cpq/migrations/.snapshot-open-mercato.json +7473 -0
- package/src/modules/cpq/migrations/Migration20260220220000_cpq.ts +51 -0
- package/src/modules/cpq/migrations/Migration20260330000000_cpq_product_domain.ts +70 -0
- package/src/modules/cpq/migrations/Migration20260331000000_cpq_charge_unique_per_offering.ts +15 -0
- package/src/modules/cpq/migrations/Migration20260401000000_cpq_quoting_v2.ts +73 -0
- package/src/modules/cpq/migrations/Migration20260402000000_cpq_workflows.ts +59 -0
- package/src/modules/cpq/migrations/Migration20260407000000_cpq_pricing_tables_v2.ts +30 -0
- package/src/modules/cpq/migrations/Migration20260407100000_cpq_price_rules.ts +36 -0
- package/src/modules/cpq/migrations/Migration20260408000000_cpq_price_rules.ts +33 -0
- package/src/modules/cpq/migrations/Migration20260410000000_cpq_drop_datacentres_inventory.ts +22 -0
- package/src/modules/cpq/migrations/Migration20260410000000_cpq_wizard_rename.ts +56 -0
- package/src/modules/cpq/migrations/Migration20260410100000_cpq_inventory.ts +118 -0
- package/src/modules/cpq/migrations/Migration20260411000000_cpq_orders.ts +62 -0
- package/src/modules/cpq/migrations/Migration20260412000000_cpq_bundled_offerings.ts +33 -0
- package/src/modules/cpq/migrations/Migration20260504064621_cpq_arc.ts +68 -0
- package/src/modules/cpq/migrations/Migration20260514000000_cpq_spec_merge_retired_deprecated.ts +30 -0
- package/src/modules/cpq/migrations/Migration20260514100000_cpq_offering_merge_retired_deprecated.ts +27 -0
- package/src/modules/cpq/migrations/Migration20260514110000_cpq_list_search_indexes.ts +82 -0
- package/src/modules/cpq/migrations/Migration20260515000000_cpq_inventory_subscriptions_search_indexes.ts +52 -0
- package/src/modules/cpq/services/__tests__/_helpers/mockEm.ts +59 -0
- package/src/modules/cpq/services/__tests__/cpqBundleService.test.ts +661 -0
- package/src/modules/cpq/services/__tests__/cpqInventoryService.arc.test.ts +357 -0
- package/src/modules/cpq/services/__tests__/cpqInventoryService.test.ts +718 -0
- package/src/modules/cpq/services/__tests__/cpqOrderService.test.ts +603 -0
- package/src/modules/cpq/services/__tests__/cpqPricingService.test.ts +1012 -0
- package/src/modules/cpq/services/__tests__/cpqProductService.test.ts +603 -0
- package/src/modules/cpq/services/__tests__/cpqQuotingService.arc.test.ts +143 -0
- package/src/modules/cpq/services/__tests__/cpqQuotingService.test.ts +658 -0
- package/src/modules/cpq/services/__tests__/cpqValidationService.test.ts +811 -0
- package/src/modules/cpq/services/__tests__/cpqWizardService.test.ts +389 -0
- package/src/modules/cpq/services/__tests__/types.test.ts +359 -0
- package/src/modules/cpq/services/cpqBundleService.ts +671 -0
- package/src/modules/cpq/services/cpqInventoryService.ts +1929 -0
- package/src/modules/cpq/services/cpqOrderService.ts +1230 -0
- package/src/modules/cpq/services/cpqPricingService.ts +412 -0
- package/src/modules/cpq/services/cpqProductService.ts +311 -0
- package/src/modules/cpq/services/cpqQuotingService.ts +2638 -0
- package/src/modules/cpq/services/cpqValidationService.ts +323 -0
- package/src/modules/cpq/services/cpqWizardService.ts +204 -0
- package/src/modules/cpq/services/types.ts +303 -0
- package/src/modules/cpq/setup.ts +63 -0
- package/src/modules/cpq/subscribers/subscription-amended-log.ts +20 -0
- package/src/modules/cpq/subscribers/subscription-cancelled-log.ts +19 -0
- package/src/modules/cpq/subscribers/subscription-merged-log.ts +22 -0
- package/src/modules/cpq/subscribers/subscription-renewed-log.ts +18 -0
- package/src/modules/cpq/subscribers/subscription-superseded-log.ts +19 -0
- package/src/modules/cpq/widgets/injection/customer-inventory/widget.client.tsx +339 -0
- package/src/modules/cpq/widgets/injection/customer-inventory/widget.ts +16 -0
- package/src/modules/cpq/widgets/injection/order-cpq-tab/widget.client.tsx +96 -0
- package/src/modules/cpq/widgets/injection/order-cpq-tab/widget.ts +16 -0
- package/src/modules/cpq/widgets/injection/quote-configurator/widget.client.tsx +265 -0
- package/src/modules/cpq/widgets/injection/quote-configurator/widget.ts +16 -0
- package/src/modules/cpq/widgets/injection-table.ts +42 -0
- package/src/modules/cpq/workflows/WizardRunner.tsx +158 -0
- package/src/modules/cpq/workflows/WizardTrigger.tsx +142 -0
- package/src/modules/cpq/workflows/engine.tsx +278 -0
- package/src/modules/cpq/workflows/registry.ts +15 -0
- package/src/modules/cpq/workflows/steps/CustomerSelectStep.tsx +136 -0
- package/src/modules/cpq/workflows/steps/InventorySelectStep.tsx +34 -0
- package/src/modules/cpq/workflows/steps/ItemListStep.tsx +146 -0
- package/src/modules/cpq/workflows/steps/OfferingSelectStep.tsx +438 -0
- package/src/modules/cpq/workflows/steps/ProductConfigureStep.tsx +287 -0
- package/src/modules/cpq/workflows/steps/ReviewStep.tsx +219 -0
- package/src/modules/cpq/workflows/steps/index.ts +51 -0
- package/src/modules/cpq/workflows/types.ts +102 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CpqProductSpecification,
|
|
3
|
+
CpqProductOffering,
|
|
4
|
+
CpqProductRelationship,
|
|
5
|
+
CpqProductAttribute,
|
|
6
|
+
CpqProductCharge,
|
|
7
|
+
CpqPricingTable,
|
|
8
|
+
CpqPricingTableEntry
|
|
9
|
+
} from "../data/entities.js";
|
|
10
|
+
class DefaultCpqProductService {
|
|
11
|
+
constructor(em) {
|
|
12
|
+
this.em = em;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Load a specification with all related entities: attributes, offerings, and relationships.
|
|
16
|
+
*/
|
|
17
|
+
async getSpecificationWithDetails(params) {
|
|
18
|
+
const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null };
|
|
19
|
+
const spec = await this.em.findOne(CpqProductSpecification, { id: params.specId, ...scope });
|
|
20
|
+
if (!spec) return null;
|
|
21
|
+
const [attributes, offerings, outgoingRelationships, incomingRelationships] = await Promise.all([
|
|
22
|
+
this.em.find(CpqProductAttribute, { specId: spec.id, ...scope }, { orderBy: { sortOrder: "asc" } }),
|
|
23
|
+
this.em.find(CpqProductOffering, { specId: spec.id, ...scope }, { orderBy: { createdAt: "asc" } }),
|
|
24
|
+
this.em.find(CpqProductRelationship, { sourceSpecId: spec.id, ...scope }),
|
|
25
|
+
this.em.find(CpqProductRelationship, { targetSpecId: spec.id, ...scope })
|
|
26
|
+
]);
|
|
27
|
+
return {
|
|
28
|
+
...spec,
|
|
29
|
+
attributes,
|
|
30
|
+
offerings,
|
|
31
|
+
relationships: {
|
|
32
|
+
outgoing: outgoingRelationships,
|
|
33
|
+
incoming: incomingRelationships
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Load an offering with its spec and charges.
|
|
39
|
+
*/
|
|
40
|
+
async getOfferingWithDetails(params) {
|
|
41
|
+
const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null };
|
|
42
|
+
const offering = await this.em.findOne(CpqProductOffering, { id: params.offeringId, ...scope });
|
|
43
|
+
if (!offering) return null;
|
|
44
|
+
const [spec, charges] = await Promise.all([
|
|
45
|
+
this.em.findOne(CpqProductSpecification, { id: offering.specId, ...scope }),
|
|
46
|
+
this.em.find(CpqProductCharge, { offeringId: offering.id, ...scope }, { orderBy: { sortOrder: "asc" } })
|
|
47
|
+
]);
|
|
48
|
+
return {
|
|
49
|
+
...offering,
|
|
50
|
+
specification: spec,
|
|
51
|
+
charges
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get constrained attributes for a specification, applying dependency rules
|
|
56
|
+
* and merging design-time values from an offering if provided.
|
|
57
|
+
*/
|
|
58
|
+
async getConstrainedAttributes(params) {
|
|
59
|
+
const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null };
|
|
60
|
+
const attributes = await this.em.find(
|
|
61
|
+
CpqProductAttribute,
|
|
62
|
+
{ specId: params.specId, ...scope },
|
|
63
|
+
{ orderBy: { sortOrder: "asc" } }
|
|
64
|
+
);
|
|
65
|
+
let evaluationContext = { ...params.currentConfig };
|
|
66
|
+
if (params.offeringId) {
|
|
67
|
+
const offering = await this.em.findOne(CpqProductOffering, { id: params.offeringId, ...scope });
|
|
68
|
+
if (offering?.designTimeValues) {
|
|
69
|
+
evaluationContext = { ...offering.designTimeValues, ...evaluationContext };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const results = [];
|
|
73
|
+
for (const attr of attributes) {
|
|
74
|
+
let resolvedOptions = attr.options ?? null;
|
|
75
|
+
if (!resolvedOptions && attr.constraints) {
|
|
76
|
+
const dyn = attr.constraints.dynamicOptionsSource;
|
|
77
|
+
if (dyn?.type === "pricing_table" && dyn.tableCode && dyn.dimensionKey) {
|
|
78
|
+
resolvedOptions = await this.resolveDynamicOptions(
|
|
79
|
+
{ tableCode: dyn.tableCode, dimensionKey: dyn.dimensionKey, filterByDimension: dyn.filterByDimension },
|
|
80
|
+
evaluationContext,
|
|
81
|
+
scope
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (attr.dependsOn && resolvedOptions) {
|
|
86
|
+
resolvedOptions = this.applyDependencyRules(attr.dependsOn, resolvedOptions, evaluationContext);
|
|
87
|
+
}
|
|
88
|
+
results.push({
|
|
89
|
+
code: attr.code,
|
|
90
|
+
name: attr.name,
|
|
91
|
+
attributeType: attr.attributeType,
|
|
92
|
+
resolutionTime: attr.resolutionTime,
|
|
93
|
+
isRequired: attr.isRequired,
|
|
94
|
+
options: resolvedOptions,
|
|
95
|
+
constraints: attr.constraints ?? null,
|
|
96
|
+
defaultValue: attr.defaultValue ?? null,
|
|
97
|
+
helpText: attr.helpText ?? null,
|
|
98
|
+
dependsOn: attr.dependsOn ?? null
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return results;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Validate design-time values against a specification's design-time attributes.
|
|
105
|
+
*/
|
|
106
|
+
async validateDesignTimeValues(params) {
|
|
107
|
+
const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null };
|
|
108
|
+
const designTimeAttrs = await this.em.find(CpqProductAttribute, {
|
|
109
|
+
specId: params.specId,
|
|
110
|
+
resolutionTime: "design_time",
|
|
111
|
+
...scope
|
|
112
|
+
});
|
|
113
|
+
const errors = [];
|
|
114
|
+
for (const attr of designTimeAttrs) {
|
|
115
|
+
const value = params.values[attr.code];
|
|
116
|
+
if (attr.isRequired && (value === void 0 || value === null || value === "")) {
|
|
117
|
+
errors.push({ attribute: attr.code, message: `${attr.name} is required` });
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (value === void 0 || value === null) continue;
|
|
121
|
+
if (attr.options && attr.options.length > 0) {
|
|
122
|
+
const validValues = attr.options.map((o) => o.value);
|
|
123
|
+
if (typeof value === "string" && !validValues.includes(value)) {
|
|
124
|
+
errors.push({
|
|
125
|
+
attribute: attr.code,
|
|
126
|
+
message: `${attr.name} must be one of: ${validValues.join(", ")}`
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return { valid: errors.length === 0, errors };
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Resolve dynamic options from a pricing table by querying unique dimension values.
|
|
135
|
+
*/
|
|
136
|
+
async resolveDynamicOptions(source, context, scope) {
|
|
137
|
+
const table = await this.em.findOne(CpqPricingTable, { code: source.tableCode, ...scope });
|
|
138
|
+
if (!table) return [];
|
|
139
|
+
const entries = await this.em.find(CpqPricingTableEntry, {
|
|
140
|
+
pricingTableId: table.id,
|
|
141
|
+
organizationId: scope.organizationId,
|
|
142
|
+
tenantId: scope.tenantId
|
|
143
|
+
});
|
|
144
|
+
let filtered = entries;
|
|
145
|
+
if (source.filterByDimension) {
|
|
146
|
+
for (const [dimKey, dimValue] of Object.entries(source.filterByDimension)) {
|
|
147
|
+
const resolvedValue = dimValue.startsWith("$") ? context[dimValue.slice(1)] : dimValue;
|
|
148
|
+
if (resolvedValue === void 0 || resolvedValue === null || resolvedValue === "") continue;
|
|
149
|
+
filtered = filtered.filter((e) => {
|
|
150
|
+
const dims = e.dimensionValues;
|
|
151
|
+
return dims?.[dimKey] === resolvedValue;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const uniqueValues = /* @__PURE__ */ new Set();
|
|
156
|
+
for (const entry of filtered) {
|
|
157
|
+
const dims = entry.dimensionValues;
|
|
158
|
+
const val = dims?.[source.dimensionKey];
|
|
159
|
+
if (typeof val === "string" && val) uniqueValues.add(val);
|
|
160
|
+
}
|
|
161
|
+
return Array.from(uniqueValues).sort().map((v) => ({ value: v, label: v }));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Apply dependency rules to filter attribute options based on evaluation context.
|
|
165
|
+
*/
|
|
166
|
+
applyDependencyRules(dependsOn, options, context) {
|
|
167
|
+
const dep = dependsOn;
|
|
168
|
+
if (!dep.attributeCode || !dep.rules || dep.effect !== "filter_options") {
|
|
169
|
+
return options;
|
|
170
|
+
}
|
|
171
|
+
const parentValue = context[dep.attributeCode];
|
|
172
|
+
if (parentValue === void 0 || parentValue === null) return options;
|
|
173
|
+
for (const rule of dep.rules) {
|
|
174
|
+
if (!rule.when || !rule.then?.options) continue;
|
|
175
|
+
const matched = this.evaluateCondition(rule.when, parentValue);
|
|
176
|
+
if (matched) {
|
|
177
|
+
const allowedValues = new Set(rule.then.options);
|
|
178
|
+
return options.filter((opt) => allowedValues.has(opt.value));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return options;
|
|
182
|
+
}
|
|
183
|
+
evaluateCondition(when, actualValue) {
|
|
184
|
+
const { operator, value } = when;
|
|
185
|
+
switch (operator) {
|
|
186
|
+
case "eq":
|
|
187
|
+
return actualValue === value;
|
|
188
|
+
case "neq":
|
|
189
|
+
return actualValue !== value;
|
|
190
|
+
case "in":
|
|
191
|
+
return Array.isArray(value) && value.includes(String(actualValue));
|
|
192
|
+
case "not_in":
|
|
193
|
+
return Array.isArray(value) && !value.includes(String(actualValue));
|
|
194
|
+
case "any":
|
|
195
|
+
return true;
|
|
196
|
+
default:
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export {
|
|
202
|
+
DefaultCpqProductService
|
|
203
|
+
};
|
|
204
|
+
//# sourceMappingURL=cpqProductService.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/cpq/services/cpqProductService.ts"],
|
|
4
|
+
"sourcesContent": ["import type { EntityManager } from '@mikro-orm/postgresql'\nimport {\n CpqProductSpecification,\n CpqProductOffering,\n CpqProductRelationship,\n CpqProductAttribute,\n CpqProductCharge,\n CpqPricingTable,\n CpqPricingTableEntry,\n} from '../data/entities'\n\nexport interface ConstrainedAttribute {\n code: string\n name: string\n attributeType: string\n resolutionTime: string\n isRequired: boolean\n options: Array<{ value: string; label: string }> | null\n constraints: Record<string, unknown> | null\n defaultValue: unknown | null\n helpText: string | null\n dependsOn: Record<string, unknown> | null\n}\n\nexport interface DesignTimeValidationResult {\n valid: boolean\n errors: Array<{ attribute: string; message: string }>\n}\n\nexport class DefaultCpqProductService {\n private em: EntityManager\n\n constructor(em: EntityManager) {\n this.em = em\n }\n\n /**\n * Load a specification with all related entities: attributes, offerings, and relationships.\n */\n async getSpecificationWithDetails(params: {\n specId: string\n organizationId: string\n tenantId: string\n }) {\n const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null }\n\n const spec = await this.em.findOne(CpqProductSpecification, { id: params.specId, ...scope })\n if (!spec) return null\n\n const [attributes, offerings, outgoingRelationships, incomingRelationships] = await Promise.all([\n this.em.find(CpqProductAttribute, { specId: spec.id, ...scope }, { orderBy: { sortOrder: 'asc' } }),\n this.em.find(CpqProductOffering, { specId: spec.id, ...scope }, { orderBy: { createdAt: 'asc' } }),\n this.em.find(CpqProductRelationship, { sourceSpecId: spec.id, ...scope }),\n this.em.find(CpqProductRelationship, { targetSpecId: spec.id, ...scope }),\n ])\n\n return {\n ...spec,\n attributes,\n offerings,\n relationships: {\n outgoing: outgoingRelationships,\n incoming: incomingRelationships,\n },\n }\n }\n\n /**\n * Load an offering with its spec and charges.\n */\n async getOfferingWithDetails(params: {\n offeringId: string\n organizationId: string\n tenantId: string\n }) {\n const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null }\n\n const offering = await this.em.findOne(CpqProductOffering, { id: params.offeringId, ...scope })\n if (!offering) return null\n\n const [spec, charges] = await Promise.all([\n this.em.findOne(CpqProductSpecification, { id: offering.specId, ...scope }),\n this.em.find(CpqProductCharge, { offeringId: offering.id, ...scope }, { orderBy: { sortOrder: 'asc' } }),\n ])\n\n return {\n ...offering,\n specification: spec,\n charges,\n }\n }\n\n /**\n * Get constrained attributes for a specification, applying dependency rules\n * and merging design-time values from an offering if provided.\n */\n async getConstrainedAttributes(params: {\n specId: string\n organizationId: string\n tenantId: string\n currentConfig: Record<string, unknown>\n offeringId?: string\n }): Promise<ConstrainedAttribute[]> {\n const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null }\n\n const attributes = await this.em.find(\n CpqProductAttribute,\n { specId: params.specId, ...scope },\n { orderBy: { sortOrder: 'asc' } },\n )\n\n // If an offering is specified, merge its design-time values into the evaluation context\n let evaluationContext = { ...params.currentConfig }\n if (params.offeringId) {\n const offering = await this.em.findOne(CpqProductOffering, { id: params.offeringId, ...scope })\n if (offering?.designTimeValues) {\n evaluationContext = { ...offering.designTimeValues, ...evaluationContext }\n }\n }\n\n const results: ConstrainedAttribute[] = []\n\n for (const attr of attributes) {\n let resolvedOptions = attr.options ?? null\n\n // Resolve dynamic options from pricing table if options are null and dynamicOptionsSource is configured\n if (!resolvedOptions && attr.constraints) {\n const dyn = (attr.constraints as Record<string, unknown>).dynamicOptionsSource as {\n type?: string\n tableCode?: string\n dimensionKey?: string\n filterByDimension?: Record<string, string>\n } | undefined\n\n if (dyn?.type === 'pricing_table' && dyn.tableCode && dyn.dimensionKey) {\n resolvedOptions = await this.resolveDynamicOptions(\n { tableCode: dyn.tableCode, dimensionKey: dyn.dimensionKey, filterByDimension: dyn.filterByDimension },\n evaluationContext,\n scope,\n )\n }\n }\n\n // Apply dependency rules if present\n if (attr.dependsOn && resolvedOptions) {\n resolvedOptions = this.applyDependencyRules(attr.dependsOn, resolvedOptions, evaluationContext)\n }\n\n results.push({\n code: attr.code,\n name: attr.name,\n attributeType: attr.attributeType,\n resolutionTime: attr.resolutionTime,\n isRequired: attr.isRequired,\n options: resolvedOptions,\n constraints: attr.constraints ?? null,\n defaultValue: attr.defaultValue ?? null,\n helpText: attr.helpText ?? null,\n dependsOn: attr.dependsOn ?? null,\n })\n }\n\n return results\n }\n\n /**\n * Validate design-time values against a specification's design-time attributes.\n */\n async validateDesignTimeValues(params: {\n specId: string\n organizationId: string\n tenantId: string\n values: Record<string, unknown>\n }): Promise<DesignTimeValidationResult> {\n const scope = { organizationId: params.organizationId, tenantId: params.tenantId, deletedAt: null }\n\n const designTimeAttrs = await this.em.find(CpqProductAttribute, {\n specId: params.specId,\n resolutionTime: 'design_time',\n ...scope,\n })\n\n const errors: Array<{ attribute: string; message: string }> = []\n\n for (const attr of designTimeAttrs) {\n const value = params.values[attr.code]\n\n // Check required\n if (attr.isRequired && (value === undefined || value === null || value === '')) {\n errors.push({ attribute: attr.code, message: `${attr.name} is required` })\n continue\n }\n\n if (value === undefined || value === null) continue\n\n // Validate against options if present\n if (attr.options && attr.options.length > 0) {\n const validValues = attr.options.map((o) => o.value)\n if (typeof value === 'string' && !validValues.includes(value)) {\n errors.push({\n attribute: attr.code,\n message: `${attr.name} must be one of: ${validValues.join(', ')}`,\n })\n }\n }\n }\n\n return { valid: errors.length === 0, errors }\n }\n\n /**\n * Resolve dynamic options from a pricing table by querying unique dimension values.\n */\n private async resolveDynamicOptions(\n source: { tableCode: string; dimensionKey: string; filterByDimension?: Record<string, string> },\n context: Record<string, unknown>,\n scope: { organizationId: string; tenantId: string; deletedAt: null },\n ): Promise<Array<{ value: string; label: string }>> {\n const table = await this.em.findOne(CpqPricingTable, { code: source.tableCode, ...scope })\n if (!table) return []\n\n const entries = await this.em.find(CpqPricingTableEntry, {\n pricingTableId: table.id,\n organizationId: scope.organizationId,\n tenantId: scope.tenantId,\n })\n\n // Filter entries by dimension filters (resolve $variable references from context)\n let filtered = entries\n if (source.filterByDimension) {\n for (const [dimKey, dimValue] of Object.entries(source.filterByDimension)) {\n const resolvedValue = dimValue.startsWith('$')\n ? context[dimValue.slice(1)]\n : dimValue\n if (resolvedValue === undefined || resolvedValue === null || resolvedValue === '') continue\n filtered = filtered.filter((e) => {\n const dims = e.dimensionValues as Record<string, unknown>\n return dims?.[dimKey] === resolvedValue\n })\n }\n }\n\n // Extract unique values for the target dimension key\n const uniqueValues = new Set<string>()\n for (const entry of filtered) {\n const dims = entry.dimensionValues as Record<string, unknown>\n const val = dims?.[source.dimensionKey]\n if (typeof val === 'string' && val) uniqueValues.add(val)\n }\n\n return Array.from(uniqueValues).sort().map((v) => ({ value: v, label: v }))\n }\n\n /**\n * Apply dependency rules to filter attribute options based on evaluation context.\n */\n private applyDependencyRules(\n dependsOn: Record<string, unknown>,\n options: Array<{ value: string; label: string }>,\n context: Record<string, unknown>,\n ): Array<{ value: string; label: string }> {\n const dep = dependsOn as {\n attributeCode?: string\n effect?: string\n rules?: Array<{\n when?: { operator?: string; value?: string | string[] }\n then?: { options?: string[]; value?: unknown; state?: boolean }\n }>\n }\n\n if (!dep.attributeCode || !dep.rules || dep.effect !== 'filter_options') {\n return options\n }\n\n const parentValue = context[dep.attributeCode]\n if (parentValue === undefined || parentValue === null) return options\n\n for (const rule of dep.rules) {\n if (!rule.when || !rule.then?.options) continue\n\n const matched = this.evaluateCondition(rule.when, parentValue)\n if (matched) {\n const allowedValues = new Set(rule.then.options)\n return options.filter((opt) => allowedValues.has(opt.value))\n }\n }\n\n return options\n }\n\n private evaluateCondition(\n when: { operator?: string; value?: string | string[] },\n actualValue: unknown,\n ): boolean {\n const { operator, value } = when\n switch (operator) {\n case 'eq':\n return actualValue === value\n case 'neq':\n return actualValue !== value\n case 'in':\n return Array.isArray(value) && value.includes(String(actualValue))\n case 'not_in':\n return Array.isArray(value) && !value.includes(String(actualValue))\n case 'any':\n return true\n default:\n return false\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoBA,MAAM,yBAAyB;AAAA,EAGpC,YAAY,IAAmB;AAC7B,SAAK,KAAK;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,4BAA4B,QAI/B;AACD,UAAM,QAAQ,EAAE,gBAAgB,OAAO,gBAAgB,UAAU,OAAO,UAAU,WAAW,KAAK;AAElG,UAAM,OAAO,MAAM,KAAK,GAAG,QAAQ,yBAAyB,EAAE,IAAI,OAAO,QAAQ,GAAG,MAAM,CAAC;AAC3F,QAAI,CAAC,KAAM,QAAO;AAElB,UAAM,CAAC,YAAY,WAAW,uBAAuB,q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