@dainamite/cpq 0.5.0 → 0.7.0
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 +64 -0
- package/MIGRATION.md +74 -0
- package/dist/modules/cpq/acl.js +1 -0
- package/dist/modules/cpq/acl.js.map +2 -2
- package/dist/modules/cpq/api/_helpers/adjustmentCommandRoute.js +45 -0
- package/dist/modules/cpq/api/_helpers/adjustmentCommandRoute.js.map +7 -0
- package/dist/modules/cpq/api/_helpers/quoteMutationGuard.js +23 -0
- package/dist/modules/cpq/api/_helpers/quoteMutationGuard.js.map +7 -0
- package/dist/modules/cpq/api/_helpers/quoteRouteOpenApi.js +19 -0
- package/dist/modules/cpq/api/_helpers/quoteRouteOpenApi.js.map +7 -0
- package/dist/modules/cpq/api/orders/[orderId]/route.js +17 -1
- package/dist/modules/cpq/api/orders/[orderId]/route.js.map +2 -2
- package/dist/modules/cpq/api/orders/route.js +47 -2
- package/dist/modules/cpq/api/orders/route.js.map +2 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/restore/route.js +54 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/restore/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.js +42 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.js.map +2 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/items/route.js +27 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/items/route.js.map +2 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/[adjustmentId]/route.js +47 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/[adjustmentId]/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/preview/route.js +30 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/preview/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/route.js +47 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/price-adjustments/route.js.map +7 -0
- package/dist/modules/cpq/api/quotes/[quoteId]/recalculate/route.js +32 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/recalculate/route.js.map +2 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/status/route.js +33 -2
- package/dist/modules/cpq/api/quotes/[quoteId]/status/route.js.map +2 -2
- package/dist/modules/cpq/api/quotes/price/route.js +43 -3
- package/dist/modules/cpq/api/quotes/price/route.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/AssetsTable.js +3 -9
- package/dist/modules/cpq/backend/cpq/inventory/AssetsTable.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/SubscriptionsTable.js +21 -25
- package/dist/modules/cpq/backend/cpq/inventory/SubscriptionsTable.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.js +48 -47
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.js +1 -1
- package/dist/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/page.meta.js +3 -3
- package/dist/modules/cpq/backend/cpq/inventory/page.meta.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/shared.js +37 -2
- package/dist/modules/cpq/backend/cpq/inventory/shared.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.js +174 -184
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.js +1 -1
- package/dist/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/offerings/[id]/page.js +168 -143
- package/dist/modules/cpq/backend/cpq/offerings/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/offerings/page.js +36 -34
- package/dist/modules/cpq/backend/cpq/offerings/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/orders/[id]/page.js +140 -280
- package/dist/modules/cpq/backend/cpq/orders/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/orders/page.js +6 -6
- package/dist/modules/cpq/backend/cpq/orders/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/orders/page.meta.js +1 -1
- package/dist/modules/cpq/backend/cpq/orders/page.meta.js.map +1 -1
- package/dist/modules/cpq/backend/cpq/price-rules/PriceRuleForm.js +41 -36
- package/dist/modules/cpq/backend/cpq/price-rules/PriceRuleForm.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.js +76 -72
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.meta.js +1 -1
- package/dist/modules/cpq/backend/cpq/price-rules/[id]/page.meta.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/price-rules/page.js +18 -15
- package/dist/modules/cpq/backend/cpq/price-rules/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.js +23 -21
- package/dist/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.js +22 -50
- package/dist/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/pricing/[id]/page.js +74 -52
- package/dist/modules/cpq/backend/cpq/pricing/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.js +20 -17
- package/dist/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/pricing/page.js +1 -1
- package/dist/modules/cpq/backend/cpq/pricing/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.js +115 -123
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentDialog.js +208 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentDialog.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentsPanel.js +79 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentsPanel.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/arcLineRemoval.js +53 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/arcLineRemoval.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/priceAdjustmentContext.js +107 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/priceAdjustmentContext.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/usePriceAdjustments.js +130 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/_components/usePriceAdjustments.js.map +7 -0
- package/dist/modules/cpq/backend/cpq/quotes/[id]/page.js +269 -311
- package/dist/modules/cpq/backend/cpq/quotes/[id]/page.js.map +3 -3
- package/dist/modules/cpq/backend/cpq/quotes/page.js +23 -19
- package/dist/modules/cpq/backend/cpq/quotes/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/quotes/page.meta.js +1 -1
- package/dist/modules/cpq/backend/cpq/quotes/page.meta.js.map +1 -1
- package/dist/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.js +19 -15
- package/dist/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/specifications/[id]/page.js +171 -178
- package/dist/modules/cpq/backend/cpq/specifications/[id]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/specifications/page.js +2 -2
- package/dist/modules/cpq/backend/cpq/specifications/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.js +60 -50
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/page.js +22 -18
- package/dist/modules/cpq/backend/cpq/wizards/[definitionCode]/page.js.map +2 -2
- package/dist/modules/cpq/backend/cpq/wizards/page.js +1 -1
- package/dist/modules/cpq/backend/cpq/wizards/page.js.map +2 -2
- package/dist/modules/cpq/ce.js +8 -0
- package/dist/modules/cpq/ce.js.map +2 -2
- package/dist/modules/cpq/cli.js +34 -1
- package/dist/modules/cpq/cli.js.map +2 -2
- package/dist/modules/cpq/commands/price-adjustments.js +107 -0
- package/dist/modules/cpq/commands/price-adjustments.js.map +7 -0
- package/dist/modules/cpq/components/ArcLineDiff.js +53 -0
- package/dist/modules/cpq/components/ArcLineDiff.js.map +7 -0
- package/dist/modules/cpq/components/ChargeBreakdownTable.js +148 -0
- package/dist/modules/cpq/components/ChargeBreakdownTable.js.map +7 -0
- package/dist/modules/cpq/components/PriceWaterfall.js +68 -0
- package/dist/modules/cpq/components/PriceWaterfall.js.map +7 -0
- package/dist/modules/cpq/components/PricingSummaryCard.js +112 -0
- package/dist/modules/cpq/components/PricingSummaryCard.js.map +7 -0
- package/dist/modules/cpq/components/StatusPath.js +5 -3
- package/dist/modules/cpq/components/StatusPath.js.map +2 -2
- package/dist/modules/cpq/components/useCpqRowActions.js +10 -22
- package/dist/modules/cpq/components/useCpqRowActions.js.map +2 -2
- package/dist/modules/cpq/components/useGrantedFeatures.js +27 -0
- package/dist/modules/cpq/components/useGrantedFeatures.js.map +7 -0
- package/dist/modules/cpq/data/entities.js +97 -0
- package/dist/modules/cpq/data/entities.js.map +2 -2
- package/dist/modules/cpq/data/price-adjustments.js +70 -0
- package/dist/modules/cpq/data/price-adjustments.js.map +7 -0
- package/dist/modules/cpq/data/validators.js +4 -0
- package/dist/modules/cpq/data/validators.js.map +2 -2
- package/dist/modules/cpq/di.js +6 -0
- package/dist/modules/cpq/di.js.map +2 -2
- package/dist/modules/cpq/events.js +47 -0
- package/dist/modules/cpq/events.js.map +2 -2
- package/dist/modules/cpq/i18n/de.json +1220 -0
- package/dist/modules/cpq/i18n/en.json +1220 -0
- package/dist/modules/cpq/i18n/es.json +1220 -0
- package/dist/modules/cpq/i18n/pl.json +1220 -0
- package/dist/modules/cpq/index.js +1 -1
- package/dist/modules/cpq/index.js.map +2 -2
- package/dist/modules/cpq/lib/auditActor.js +10 -0
- package/dist/modules/cpq/lib/auditActor.js.map +7 -0
- package/dist/modules/cpq/lib/formatMoney.js +7 -0
- package/dist/modules/cpq/lib/formatMoney.js.map +7 -0
- package/dist/modules/cpq/lib/priceAdjustmentDefaults.js +60 -0
- package/dist/modules/cpq/lib/priceAdjustmentDefaults.js.map +7 -0
- package/dist/modules/cpq/lib/priceAdjustmentView.js +169 -0
- package/dist/modules/cpq/lib/priceAdjustmentView.js.map +7 -0
- package/dist/modules/cpq/lib/quotePermissions.js +13 -0
- package/dist/modules/cpq/lib/quotePermissions.js.map +7 -0
- package/dist/modules/cpq/lib/quoteSummaryView.js +28 -0
- package/dist/modules/cpq/lib/quoteSummaryView.js.map +7 -0
- package/dist/modules/cpq/migrations/Migration20261110213052.js +22 -0
- package/dist/modules/cpq/migrations/Migration20261110213052.js.map +7 -0
- package/dist/modules/cpq/services/arcLineRemoval.js +53 -0
- package/dist/modules/cpq/services/arcLineRemoval.js.map +7 -0
- package/dist/modules/cpq/services/arcPriceFreeze.js +79 -0
- package/dist/modules/cpq/services/arcPriceFreeze.js.map +7 -0
- package/dist/modules/cpq/services/cpqOrderService.js +25 -28
- package/dist/modules/cpq/services/cpqOrderService.js.map +2 -2
- package/dist/modules/cpq/services/cpqPricingService.js +7 -0
- package/dist/modules/cpq/services/cpqPricingService.js.map +2 -2
- package/dist/modules/cpq/services/cpqQuotingService.js +330 -109
- package/dist/modules/cpq/services/cpqQuotingService.js.map +2 -2
- package/dist/modules/cpq/services/orderPricingSummary.js +26 -0
- package/dist/modules/cpq/services/orderPricingSummary.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/adjustmentService.js +264 -0
- package/dist/modules/cpq/services/priceAdjustments/adjustmentService.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/chargeWaterfall.js +25 -0
- package/dist/modules/cpq/services/priceAdjustments/chargeWaterfall.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/loadQuoteAdjustments.js +38 -0
- package/dist/modules/cpq/services/priceAdjustments/loadQuoteAdjustments.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/pricingSnapshot.js +104 -0
- package/dist/modules/cpq/services/priceAdjustments/pricingSnapshot.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/quoteAdjustmentLifecycle.js +102 -0
- package/dist/modules/cpq/services/priceAdjustments/quoteAdjustmentLifecycle.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/quotePricingEvents.js +52 -0
- package/dist/modules/cpq/services/priceAdjustments/quotePricingEvents.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/quotePricingWrite.js +37 -0
- package/dist/modules/cpq/services/priceAdjustments/quotePricingWrite.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/resolveManualAdjustments.js +107 -0
- package/dist/modules/cpq/services/priceAdjustments/resolveManualAdjustments.js.map +7 -0
- package/dist/modules/cpq/services/priceAdjustments/storedAdjustmentFailure.js +30 -0
- package/dist/modules/cpq/services/priceAdjustments/storedAdjustmentFailure.js.map +7 -0
- package/dist/modules/cpq/services/types.js.map +2 -2
- package/dist/modules/cpq/setup.js +6 -0
- package/dist/modules/cpq/setup.js.map +2 -2
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.client.js +39 -31
- package/dist/modules/cpq/widgets/injection/customer-inventory/widget.client.js.map +2 -2
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.client.js +13 -5
- package/dist/modules/cpq/widgets/injection/order-cpq-tab/widget.client.js.map +2 -2
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.client.js +41 -21
- package/dist/modules/cpq/widgets/injection/quote-configurator/widget.client.js.map +2 -2
- package/dist/modules/cpq/widgets/injection-table.js +2 -2
- package/dist/modules/cpq/widgets/injection-table.js.map +2 -2
- package/dist/modules/cpq/workflows/WizardRunner.js +10 -8
- package/dist/modules/cpq/workflows/WizardRunner.js.map +2 -2
- package/dist/modules/cpq/workflows/WizardTrigger.js +15 -9
- package/dist/modules/cpq/workflows/WizardTrigger.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/CustomerSelectStep.js +9 -7
- package/dist/modules/cpq/workflows/steps/CustomerSelectStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/InventorySelectStep.js +9 -4
- package/dist/modules/cpq/workflows/steps/InventorySelectStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/ItemListStep.js +16 -19
- package/dist/modules/cpq/workflows/steps/ItemListStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/OfferingSelectStep.js +19 -32
- package/dist/modules/cpq/workflows/steps/OfferingSelectStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/ProductConfigureStep.js +8 -6
- package/dist/modules/cpq/workflows/steps/ProductConfigureStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/ReviewStep.js +32 -30
- package/dist/modules/cpq/workflows/steps/ReviewStep.js.map +2 -2
- package/dist/modules/cpq/workflows/steps/index.js +12 -0
- package/dist/modules/cpq/workflows/steps/index.js.map +2 -2
- package/package.json +1 -1
- package/src/modules/cpq/__integration__/TC-CPQ-ARC-012.spec.ts +134 -0
- package/src/modules/cpq/__tests__/i18n/dictionaries.test.ts +62 -0
- package/src/modules/cpq/__tests__/i18n/hardcodedStrings.test.ts +35 -0
- package/src/modules/cpq/__tests__/i18n/sourceScan.ts +109 -0
- package/src/modules/cpq/acl.ts +1 -0
- package/src/modules/cpq/api/__tests__/adjustmentRoutes.test.ts +79 -0
- package/src/modules/cpq/api/__tests__/quoteWriteGuards.test.ts +100 -0
- package/src/modules/cpq/api/_helpers/__tests__/quoteMutationGuard.test.ts +48 -0
- package/src/modules/cpq/api/_helpers/adjustmentCommandRoute.ts +45 -0
- package/src/modules/cpq/api/_helpers/quoteMutationGuard.ts +38 -0
- package/src/modules/cpq/api/_helpers/quoteRouteOpenApi.ts +19 -0
- package/src/modules/cpq/api/orders/[orderId]/route.ts +18 -0
- package/src/modules/cpq/api/orders/route.ts +51 -1
- package/src/modules/cpq/api/quotes/[quoteId]/items/[lineId]/restore/route.ts +56 -0
- package/src/modules/cpq/api/quotes/[quoteId]/items/[lineId]/route.ts +48 -1
- package/src/modules/cpq/api/quotes/[quoteId]/items/route.ts +31 -1
- package/src/modules/cpq/api/quotes/[quoteId]/price-adjustments/[adjustmentId]/route.ts +39 -0
- package/src/modules/cpq/api/quotes/[quoteId]/price-adjustments/preview/route.ts +24 -0
- package/src/modules/cpq/api/quotes/[quoteId]/price-adjustments/route.ts +40 -0
- package/src/modules/cpq/api/quotes/[quoteId]/recalculate/__tests__/route.test.ts +95 -0
- package/src/modules/cpq/api/quotes/[quoteId]/recalculate/route.ts +40 -1
- package/src/modules/cpq/api/quotes/[quoteId]/status/__tests__/route.test.ts +74 -0
- package/src/modules/cpq/api/quotes/[quoteId]/status/route.ts +37 -1
- package/src/modules/cpq/api/quotes/price/__tests__/route.test.ts +37 -0
- package/src/modules/cpq/api/quotes/price/route.ts +28 -2
- package/src/modules/cpq/backend/cpq/inventory/AssetsTable.tsx +3 -9
- package/src/modules/cpq/backend/cpq/inventory/SubscriptionsTable.tsx +22 -26
- package/src/modules/cpq/backend/cpq/inventory/assets/[id]/page.meta.ts +1 -1
- package/src/modules/cpq/backend/cpq/inventory/assets/[id]/page.tsx +43 -46
- package/src/modules/cpq/backend/cpq/inventory/page.meta.ts +3 -3
- package/src/modules/cpq/backend/cpq/inventory/shared.tsx +37 -1
- package/src/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.meta.ts +1 -1
- package/src/modules/cpq/backend/cpq/inventory/subscriptions/[id]/page.tsx +164 -120
- package/src/modules/cpq/backend/cpq/offerings/[id]/page.tsx +169 -130
- package/src/modules/cpq/backend/cpq/offerings/page.tsx +34 -24
- package/src/modules/cpq/backend/cpq/orders/[id]/page.tsx +122 -308
- package/src/modules/cpq/backend/cpq/orders/page.meta.ts +1 -1
- package/src/modules/cpq/backend/cpq/orders/page.tsx +6 -6
- package/src/modules/cpq/backend/cpq/price-rules/PriceRuleForm.tsx +48 -34
- package/src/modules/cpq/backend/cpq/price-rules/[id]/page.meta.ts +1 -1
- package/src/modules/cpq/backend/cpq/price-rules/[id]/page.tsx +76 -70
- package/src/modules/cpq/backend/cpq/price-rules/page.tsx +25 -16
- package/src/modules/cpq/backend/cpq/pricing/[id]/EntriesEditor.tsx +24 -18
- package/src/modules/cpq/backend/cpq/pricing/[id]/ImportPreview.tsx +29 -19
- package/src/modules/cpq/backend/cpq/pricing/[id]/page.tsx +95 -47
- package/src/modules/cpq/backend/cpq/pricing/[id]/xlsxImport.ts +23 -15
- package/src/modules/cpq/backend/cpq/pricing/page.tsx +1 -1
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/ArcQuoteConfigurator.tsx +111 -88
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentDialog.tsx +260 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/PriceAdjustmentsPanel.tsx +124 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/__tests__/PriceAdjustmentsPanel.test.tsx +76 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/arcLineRemoval.tsx +76 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/priceAdjustmentContext.tsx +133 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/_components/usePriceAdjustments.tsx +165 -0
- package/src/modules/cpq/backend/cpq/quotes/[id]/page.tsx +304 -348
- package/src/modules/cpq/backend/cpq/quotes/page.meta.ts +1 -1
- package/src/modules/cpq/backend/cpq/quotes/page.tsx +29 -21
- package/src/modules/cpq/backend/cpq/specifications/[id]/DependsOnRulesEditor.tsx +19 -15
- package/src/modules/cpq/backend/cpq/specifications/[id]/page.tsx +171 -171
- package/src/modules/cpq/backend/cpq/specifications/page.tsx +2 -2
- package/src/modules/cpq/backend/cpq/wizards/[definitionCode]/detail/page.tsx +51 -41
- package/src/modules/cpq/backend/cpq/wizards/[definitionCode]/page.tsx +17 -13
- package/src/modules/cpq/backend/cpq/wizards/page.tsx +1 -1
- package/src/modules/cpq/ce.ts +8 -0
- package/src/modules/cpq/cli.ts +48 -1
- package/src/modules/cpq/commands/__tests__/price-adjustments.test.ts +54 -0
- package/src/modules/cpq/commands/price-adjustments.ts +90 -0
- package/src/modules/cpq/components/ArcLineDiff.tsx +87 -0
- package/src/modules/cpq/components/ChargeBreakdownTable.tsx +203 -0
- package/src/modules/cpq/components/PriceWaterfall.tsx +96 -0
- package/src/modules/cpq/components/PricingSummaryCard.tsx +128 -0
- package/src/modules/cpq/components/StatusPath.tsx +7 -4
- package/src/modules/cpq/components/__tests__/PriceWaterfall.test.tsx +38 -0
- package/src/modules/cpq/components/useCpqRowActions.tsx +17 -25
- package/src/modules/cpq/components/useGrantedFeatures.ts +35 -0
- package/src/modules/cpq/data/__tests__/price-adjustment-migration.test.ts +11 -0
- package/src/modules/cpq/data/__tests__/price-adjustments.test.ts +26 -0
- package/src/modules/cpq/data/entities.ts +83 -0
- package/src/modules/cpq/data/price-adjustments.ts +67 -0
- package/src/modules/cpq/data/validators.ts +3 -0
- package/src/modules/cpq/di.ts +6 -0
- package/src/modules/cpq/events.ts +53 -2
- package/src/modules/cpq/i18n/de.json +1220 -0
- package/src/modules/cpq/i18n/en.json +1220 -0
- package/src/modules/cpq/i18n/es.json +1220 -0
- package/src/modules/cpq/i18n/pl.json +1220 -0
- package/src/modules/cpq/index.ts +1 -1
- package/src/modules/cpq/lib/__tests__/auditActor.test.ts +12 -0
- package/src/modules/cpq/lib/__tests__/priceAdjustmentDefaults.test.ts +37 -0
- package/src/modules/cpq/lib/__tests__/priceAdjustmentView.test.ts +152 -0
- package/src/modules/cpq/lib/__tests__/quotePermissions.test.ts +30 -0
- package/src/modules/cpq/lib/__tests__/quoteSummaryView.test.ts +56 -0
- package/src/modules/cpq/lib/auditActor.ts +13 -0
- package/src/modules/cpq/lib/formatMoney.ts +4 -0
- package/src/modules/cpq/lib/priceAdjustmentDefaults.ts +36 -0
- package/src/modules/cpq/lib/priceAdjustmentView.ts +259 -0
- package/src/modules/cpq/lib/quotePermissions.ts +22 -0
- package/src/modules/cpq/lib/quoteSummaryView.ts +51 -0
- package/src/modules/cpq/migrations/.snapshot-open-mercato.json +3298 -2423
- package/src/modules/cpq/migrations/Migration20261110213052.ts +22 -0
- package/src/modules/cpq/services/__tests__/_helpers/mockEm.ts +9 -2
- package/src/modules/cpq/services/__tests__/adjustmentService.test.ts +183 -0
- package/src/modules/cpq/services/__tests__/arcLineRemoval.test.ts +109 -0
- package/src/modules/cpq/services/__tests__/arcPriceFreeze.test.ts +141 -0
- package/src/modules/cpq/services/__tests__/chargeWaterfall.test.ts +28 -0
- package/src/modules/cpq/services/__tests__/cpqOrderService.test.ts +35 -2
- package/src/modules/cpq/services/__tests__/cpqPricingService.test.ts +57 -0
- package/src/modules/cpq/services/__tests__/cpqQuotingService.arc.test.ts +237 -0
- package/src/modules/cpq/services/__tests__/cpqQuotingService.test.ts +58 -3
- package/src/modules/cpq/services/__tests__/orderPricingSummary.test.ts +50 -0
- package/src/modules/cpq/services/__tests__/pricingSnapshot.test.ts +62 -0
- package/src/modules/cpq/services/__tests__/quoteAdjustmentLifecycle.test.ts +35 -0
- package/src/modules/cpq/services/__tests__/quoteAdjustmentPricing.test.ts +65 -0
- package/src/modules/cpq/services/__tests__/quoteCloneAdjustments.test.ts +45 -0
- package/src/modules/cpq/services/__tests__/quoteDetachTargetAdjustments.test.ts +54 -0
- package/src/modules/cpq/services/__tests__/quoteEventsService.test.ts +72 -0
- package/src/modules/cpq/services/__tests__/quotePricingEvents.test.ts +126 -0
- package/src/modules/cpq/services/__tests__/quotePricingIsolation.test.ts +52 -0
- package/src/modules/cpq/services/__tests__/quotePricingWrite.test.ts +74 -0
- package/src/modules/cpq/services/__tests__/resolveManualAdjustments.test.ts +90 -0
- package/src/modules/cpq/services/__tests__/storedAdjustmentFailure.test.ts +9 -0
- package/src/modules/cpq/services/arcLineRemoval.ts +87 -0
- package/src/modules/cpq/services/arcPriceFreeze.ts +165 -0
- package/src/modules/cpq/services/cpqOrderService.ts +22 -28
- package/src/modules/cpq/services/cpqPricingService.ts +8 -0
- package/src/modules/cpq/services/cpqQuotingService.ts +374 -125
- package/src/modules/cpq/services/orderPricingSummary.ts +47 -0
- package/src/modules/cpq/services/priceAdjustments/adjustmentService.ts +249 -0
- package/src/modules/cpq/services/priceAdjustments/chargeWaterfall.ts +28 -0
- package/src/modules/cpq/services/priceAdjustments/loadQuoteAdjustments.ts +25 -0
- package/src/modules/cpq/services/priceAdjustments/pricingSnapshot.ts +86 -0
- package/src/modules/cpq/services/priceAdjustments/quoteAdjustmentLifecycle.ts +68 -0
- package/src/modules/cpq/services/priceAdjustments/quotePricingEvents.ts +94 -0
- package/src/modules/cpq/services/priceAdjustments/quotePricingWrite.ts +51 -0
- package/src/modules/cpq/services/priceAdjustments/resolveManualAdjustments.ts +116 -0
- package/src/modules/cpq/services/priceAdjustments/storedAdjustmentFailure.ts +31 -0
- package/src/modules/cpq/services/types.ts +34 -1
- package/src/modules/cpq/setup.ts +7 -1
- package/src/modules/cpq/widgets/injection/customer-inventory/widget.client.tsx +38 -31
- package/src/modules/cpq/widgets/injection/order-cpq-tab/widget.client.tsx +7 -5
- package/src/modules/cpq/widgets/injection/quote-configurator/widget.client.tsx +36 -21
- package/src/modules/cpq/widgets/injection-table.ts +8 -2
- package/src/modules/cpq/workflows/WizardRunner.tsx +8 -5
- package/src/modules/cpq/workflows/WizardTrigger.tsx +15 -9
- package/src/modules/cpq/workflows/steps/CustomerSelectStep.tsx +11 -7
- package/src/modules/cpq/workflows/steps/InventorySelectStep.tsx +9 -5
- package/src/modules/cpq/workflows/steps/ItemListStep.tsx +18 -12
- package/src/modules/cpq/workflows/steps/OfferingSelectStep.tsx +20 -16
- package/src/modules/cpq/workflows/steps/ProductConfigureStep.tsx +8 -6
- package/src/modules/cpq/workflows/steps/ReviewStep.tsx +33 -18
- package/src/modules/cpq/workflows/steps/index.ts +12 -0
- package/src/modules/cpq/workflows/types.ts +4 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/cpq/components/useCpqRowActions.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\nimport * as React from 'react'\nimport { flash } from '@open-mercato/ui/backend/FlashMessages'\nimport { type RowActionItem } from '@open-mercato/ui/backend/RowActions'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { useConfirmDialog } from '@open-mercato/ui/backend/confirm-dialog'\n\n// \u2500\u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type UseCpqRowActionsOptions<T extends { id: string }> = {\n /** DELETE endpoint that accepts `{ id }` body (e.g. `/api/cpq/product-offerings`). */\n endpoint: string\n /**\n * Singular noun for the entity
|
|
5
|
-
"mappings": ";AACA,YAAY,WAAW;AACvB,SAAS,aAAa;AAEtB,SAAS,YAAY;AACrB,SAAS,wBAAwB;
|
|
4
|
+
"sourcesContent": ["\"use client\"\nimport * as React from 'react'\nimport { flash } from '@open-mercato/ui/backend/FlashMessages'\nimport { type RowActionItem } from '@open-mercato/ui/backend/RowActions'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { useConfirmDialog } from '@open-mercato/ui/backend/confirm-dialog'\n\n// \u2500\u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type UseCpqRowActionsOptions<T extends { id: string }> = {\n /** DELETE endpoint that accepts `{ id }` body (e.g. `/api/cpq/product-offerings`). */\n endpoint: string\n /**\n * Singular noun for the entity (e.g. `'offering'`).\n *\n * @deprecated Not used in messages any more: splicing a noun into a\n * sentence cannot produce correct grammar in ES / DE / PL (gender, case).\n * Confirm and flash messages are noun-free and count-based\n * (spec 2026-11-15-cpq-multi-language). Kept for API compatibility.\n */\n entityName?: string\n /**\n * Build the href for the row's edit/detail page (e.g. `(row) =>\n * `/backend/cpq/offerings/${row.id}`).\n */\n editHref: (row: T) => string\n /** Reload the table after a successful delete. */\n onReload: () => void\n /**\n * Override the row-deletion guard. Returning `false` skips the\n * delete request without flashing an error (e.g. when the row is in a\n * lifecycle state that disallows deletion).\n */\n canDelete?: (row: T) => boolean\n}\n\nexport type CpqRowActionsApi<T extends { id: string }> = {\n /**\n * Items for `<RowActions>` for a single row. Always returns\n * `Edit` + `Delete` \u2014 extras can be prepended / appended.\n */\n buildItems: (row: T, extras?: { prepend?: RowActionItem[]; append?: RowActionItem[] }) => RowActionItem[]\n /**\n * Bulk-delete handler suitable for `<DataTable bulkActions>`. Confirms once\n * for the whole selection, then issues `DELETE` requests sequentially so\n * a partial failure stops cleanly. Reports per-row failures via `flash`.\n *\n * Note: sequential by design \u2014 DELETE on the same table from N parallel\n * requests can deadlock at the row-lock level under load. Chunked\n * parallelism would be the next step if selection counts grow > ~200.\n */\n bulkDelete: (rows: T[]) => Promise<{ ok: boolean; affectedCount?: number }>\n /**\n * Render this element somewhere in the page (typically as the\n * `footerContent` slot of `<CpqListView>`) so the confirm dialog\n * portal mounts.\n */\n ConfirmDialogElement: React.ReactNode\n}\n\n// \u2500\u2500\u2500 Implementation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport function useCpqRowActions<T extends { id: string }>(\n options: UseCpqRowActionsOptions<T>,\n): CpqRowActionsApi<T> {\n const { endpoint, editHref, onReload, canDelete } = options\n const t = useT()\n const { confirm, ConfirmDialogElement } = useConfirmDialog()\n\n const deleteOne = React.useCallback(\n async (id: string) => {\n const res = await fetch(endpoint, {\n method: 'DELETE',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ id }),\n })\n return res.ok\n },\n [endpoint],\n )\n\n const singleDelete = React.useCallback(\n async (row: T) => {\n if (canDelete && !canDelete(row)) return\n const confirmed = await confirm({\n title: t('cpq.rowActions.deleteOne.confirm', 'Delete this item?'),\n variant: 'destructive',\n })\n if (!confirmed) return\n const ok = await deleteOne(row.id)\n if (!ok) {\n flash(\n t('cpq.rowActions.deleteOne.error', 'Failed to delete the item'),\n 'error',\n )\n return\n }\n flash(t('cpq.rowActions.deleteOne.success', 'Item deleted'), 'success')\n onReload()\n },\n [canDelete, confirm, deleteOne, onReload, t],\n )\n\n const bulkDelete = React.useCallback(\n async (rows: T[]) => {\n if (!rows.length) return { ok: false }\n const eligible = canDelete ? rows.filter(canDelete) : rows\n if (!eligible.length) {\n flash(\n t('cpq.rowActions.deleteBulk.noEligible', 'None of the selected items can be deleted in their current state.'),\n 'error',\n )\n return { ok: false }\n }\n const confirmed = await confirm({\n title: t('cpq.rowActions.deleteBulk.confirm', 'Delete selected items ({count})?', { count: eligible.length }),\n variant: 'destructive',\n })\n if (!confirmed) return { ok: false }\n\n let failed = 0\n for (const row of eligible) {\n const ok = await deleteOne(row.id)\n if (!ok) failed += 1\n }\n\n if (failed > 0) {\n flash(\n t('cpq.rowActions.deleteBulk.partialError', 'Failed to delete {count} of the selected items', { count: failed }),\n 'error',\n )\n } else {\n flash(\n t('cpq.rowActions.deleteBulk.success', 'Selected items deleted ({count})', { count: eligible.length }),\n 'success',\n )\n }\n onReload()\n return { ok: failed === 0, affectedCount: eligible.length - failed }\n },\n [canDelete, confirm, deleteOne, onReload, t],\n )\n\n const buildItems = React.useCallback(\n (row: T, extras?: { prepend?: RowActionItem[]; append?: RowActionItem[] }): RowActionItem[] => {\n const items: RowActionItem[] = []\n if (extras?.prepend) items.push(...extras.prepend)\n items.push({\n id: 'edit',\n label: t('cpq.rowActions.edit', 'Edit'),\n href: editHref(row),\n })\n if (extras?.append) items.push(...extras.append)\n const deletable = !canDelete || canDelete(row)\n if (deletable) {\n items.push({\n id: 'delete',\n label: t('cpq.rowActions.delete', 'Delete'),\n destructive: true,\n onSelect: () => {\n void singleDelete(row)\n },\n })\n }\n return items\n },\n [canDelete, editHref, singleDelete, t],\n )\n\n return {\n buildItems,\n bulkDelete,\n ConfirmDialogElement,\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { apiCall } from "@open-mercato/ui/backend/utils/apiCall";
|
|
4
|
+
function useGrantedFeatures(features) {
|
|
5
|
+
const [granted, setGranted] = React.useState([]);
|
|
6
|
+
const key = features.join("|");
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
if (!key) return;
|
|
9
|
+
let cancelled = false;
|
|
10
|
+
void (async () => {
|
|
11
|
+
const call = await apiCall("/api/auth/feature-check", {
|
|
12
|
+
method: "POST",
|
|
13
|
+
headers: { "content-type": "application/json" },
|
|
14
|
+
body: JSON.stringify({ features: key.split("|") })
|
|
15
|
+
});
|
|
16
|
+
if (!cancelled && call.ok && call.result?.granted) setGranted(call.result.granted);
|
|
17
|
+
})();
|
|
18
|
+
return () => {
|
|
19
|
+
cancelled = true;
|
|
20
|
+
};
|
|
21
|
+
}, [key]);
|
|
22
|
+
return granted;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
useGrantedFeatures
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useGrantedFeatures.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/cpq/components/useGrantedFeatures.ts"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { apiCall } from '@open-mercato/ui/backend/utils/apiCall'\n\ntype FeatureCheckResponse = { granted: string[] }\n\n/**\n * Resolve which of `features` the current user holds, through the framework's\n * `POST /api/auth/feature-check` endpoint (the same one the component-override\n * provider uses). Returns an empty list until the check completes, so callers\n * hide privileged actions by default.\n */\nexport function useGrantedFeatures(features: readonly string[]): readonly string[] {\n const [granted, setGranted] = React.useState<readonly string[]>([])\n const key = features.join('|')\n\n React.useEffect(() => {\n if (!key) return\n let cancelled = false\n void (async () => {\n const call = await apiCall<FeatureCheckResponse>('/api/auth/feature-check', {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ features: key.split('|') }),\n })\n if (!cancelled && call.ok && call.result?.granted) setGranted(call.result.granted)\n })()\n return () => {\n cancelled = true\n }\n }, [key])\n\n return granted\n}\n"],
|
|
5
|
+
"mappings": ";AAEA,YAAY,WAAW;AACvB,SAAS,eAAe;AAUjB,SAAS,mBAAmB,UAAgD;AACjF,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAA4B,CAAC,CAAC;AAClE,QAAM,MAAM,SAAS,KAAK,GAAG;AAE7B,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,IAAK;AACV,QAAI,YAAY;AAChB,UAAM,YAAY;AAChB,YAAM,OAAO,MAAM,QAA8B,2BAA2B;AAAA,QAC1E,QAAQ;AAAA,QACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,QAC9C,MAAM,KAAK,UAAU,EAAE,UAAU,IAAI,MAAM,GAAG,EAAE,CAAC;AAAA,MACnD,CAAC;AACD,UAAI,CAAC,aAAa,KAAK,MAAM,KAAK,QAAQ,QAAS,YAAW,KAAK,OAAO,OAAO;AAAA,IACnF,GAAG;AACH,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EACF,GAAG,CAAC,GAAG,CAAC;AAER,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -678,6 +678,7 @@ CpqPriceRule = __decorateClass([
|
|
|
678
678
|
OptionalProps;
|
|
679
679
|
let CpqQuoteConfiguration = class {
|
|
680
680
|
constructor() {
|
|
681
|
+
this.pricingRevision = 0;
|
|
681
682
|
this.cpqStatus = "new";
|
|
682
683
|
this.version = 1;
|
|
683
684
|
this.currencyCode = "USD";
|
|
@@ -701,6 +702,9 @@ __decorateClass([
|
|
|
701
702
|
__decorateClass([
|
|
702
703
|
Property({ name: "customer_id", type: "uuid" })
|
|
703
704
|
], CpqQuoteConfiguration.prototype, "customerId", 2);
|
|
705
|
+
__decorateClass([
|
|
706
|
+
Property({ name: "pricing_revision", type: "integer", default: 0 })
|
|
707
|
+
], CpqQuoteConfiguration.prototype, "pricingRevision", 2);
|
|
704
708
|
__decorateClass([
|
|
705
709
|
Property({ name: "cpq_status", type: "text", default: "new" })
|
|
706
710
|
], CpqQuoteConfiguration.prototype, "cpqStatus", 2);
|
|
@@ -1534,6 +1538,98 @@ CpqSubscriptionChangeLog = __decorateClass([
|
|
|
1534
1538
|
properties: ["sourceOrderId", "subscriptionId"]
|
|
1535
1539
|
})
|
|
1536
1540
|
], CpqSubscriptionChangeLog);
|
|
1541
|
+
OptionalProps;
|
|
1542
|
+
let CpqQuotePriceAdjustment = class {
|
|
1543
|
+
constructor() {
|
|
1544
|
+
this.chargeCode = null;
|
|
1545
|
+
this.chargeTypeFilter = null;
|
|
1546
|
+
this.currencyCode = null;
|
|
1547
|
+
this.windowKind = "relative";
|
|
1548
|
+
this.fromMonth = 1;
|
|
1549
|
+
this.toMonth = null;
|
|
1550
|
+
this.reasonNote = null;
|
|
1551
|
+
this.updatedByUserId = null;
|
|
1552
|
+
this.isActive = true;
|
|
1553
|
+
this.createdAt = /* @__PURE__ */ new Date();
|
|
1554
|
+
this.updatedAt = /* @__PURE__ */ new Date();
|
|
1555
|
+
this.deletedAt = null;
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
__decorateClass([
|
|
1559
|
+
PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
|
|
1560
|
+
], CpqQuotePriceAdjustment.prototype, "id", 2);
|
|
1561
|
+
__decorateClass([
|
|
1562
|
+
Property({ name: "organization_id", type: "uuid" })
|
|
1563
|
+
], CpqQuotePriceAdjustment.prototype, "organizationId", 2);
|
|
1564
|
+
__decorateClass([
|
|
1565
|
+
Property({ name: "tenant_id", type: "uuid" })
|
|
1566
|
+
], CpqQuotePriceAdjustment.prototype, "tenantId", 2);
|
|
1567
|
+
__decorateClass([
|
|
1568
|
+
Property({ name: "quote_configuration_id", type: "uuid" })
|
|
1569
|
+
], CpqQuotePriceAdjustment.prototype, "quoteConfigurationId", 2);
|
|
1570
|
+
__decorateClass([
|
|
1571
|
+
Property({ name: "quote_id", type: "uuid" })
|
|
1572
|
+
], CpqQuotePriceAdjustment.prototype, "quoteId", 2);
|
|
1573
|
+
__decorateClass([
|
|
1574
|
+
Property({ name: "quote_line_id", type: "uuid" })
|
|
1575
|
+
], CpqQuotePriceAdjustment.prototype, "quoteLineId", 2);
|
|
1576
|
+
__decorateClass([
|
|
1577
|
+
Property({ type: "text" })
|
|
1578
|
+
], CpqQuotePriceAdjustment.prototype, "level", 2);
|
|
1579
|
+
__decorateClass([
|
|
1580
|
+
Property({ name: "charge_code", type: "text", nullable: true })
|
|
1581
|
+
], CpqQuotePriceAdjustment.prototype, "chargeCode", 2);
|
|
1582
|
+
__decorateClass([
|
|
1583
|
+
Property({ name: "charge_type_filter", type: "text", nullable: true })
|
|
1584
|
+
], CpqQuotePriceAdjustment.prototype, "chargeTypeFilter", 2);
|
|
1585
|
+
__decorateClass([
|
|
1586
|
+
Property({ name: "adjustment_type", type: "text" })
|
|
1587
|
+
], CpqQuotePriceAdjustment.prototype, "adjustmentType", 2);
|
|
1588
|
+
__decorateClass([
|
|
1589
|
+
Property({ type: "numeric", columnType: "numeric(18, 4)" })
|
|
1590
|
+
], CpqQuotePriceAdjustment.prototype, "value", 2);
|
|
1591
|
+
__decorateClass([
|
|
1592
|
+
Property({ name: "currency_code", type: "text", nullable: true })
|
|
1593
|
+
], CpqQuotePriceAdjustment.prototype, "currencyCode", 2);
|
|
1594
|
+
__decorateClass([
|
|
1595
|
+
Property({ name: "window_kind", type: "text", default: "relative" })
|
|
1596
|
+
], CpqQuotePriceAdjustment.prototype, "windowKind", 2);
|
|
1597
|
+
__decorateClass([
|
|
1598
|
+
Property({ name: "from_month", type: "integer", default: 1 })
|
|
1599
|
+
], CpqQuotePriceAdjustment.prototype, "fromMonth", 2);
|
|
1600
|
+
__decorateClass([
|
|
1601
|
+
Property({ name: "to_month", type: "integer", nullable: true })
|
|
1602
|
+
], CpqQuotePriceAdjustment.prototype, "toMonth", 2);
|
|
1603
|
+
__decorateClass([
|
|
1604
|
+
Property({ name: "reason_code", type: "text" })
|
|
1605
|
+
], CpqQuotePriceAdjustment.prototype, "reasonCode", 2);
|
|
1606
|
+
__decorateClass([
|
|
1607
|
+
Property({ name: "reason_note", type: "text", nullable: true })
|
|
1608
|
+
], CpqQuotePriceAdjustment.prototype, "reasonNote", 2);
|
|
1609
|
+
__decorateClass([
|
|
1610
|
+
Property({ name: "created_by_user_id", type: "uuid" })
|
|
1611
|
+
], CpqQuotePriceAdjustment.prototype, "createdByUserId", 2);
|
|
1612
|
+
__decorateClass([
|
|
1613
|
+
Property({ name: "updated_by_user_id", type: "uuid", nullable: true })
|
|
1614
|
+
], CpqQuotePriceAdjustment.prototype, "updatedByUserId", 2);
|
|
1615
|
+
__decorateClass([
|
|
1616
|
+
Property({ name: "is_active", type: "boolean", default: true })
|
|
1617
|
+
], CpqQuotePriceAdjustment.prototype, "isActive", 2);
|
|
1618
|
+
__decorateClass([
|
|
1619
|
+
Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
|
|
1620
|
+
], CpqQuotePriceAdjustment.prototype, "createdAt", 2);
|
|
1621
|
+
__decorateClass([
|
|
1622
|
+
Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date() })
|
|
1623
|
+
], CpqQuotePriceAdjustment.prototype, "updatedAt", 2);
|
|
1624
|
+
__decorateClass([
|
|
1625
|
+
Property({ name: "deleted_at", type: Date, nullable: true })
|
|
1626
|
+
], CpqQuotePriceAdjustment.prototype, "deletedAt", 2);
|
|
1627
|
+
CpqQuotePriceAdjustment = __decorateClass([
|
|
1628
|
+
Entity({ tableName: "cpq_quote_price_adjustments" }),
|
|
1629
|
+
Index({ name: "cpq_qpa_quote_config_idx", properties: ["organizationId", "tenantId", "quoteConfigurationId"] }),
|
|
1630
|
+
Index({ name: "cpq_qpa_quote_line_idx", properties: ["organizationId", "tenantId", "quoteLineId"] }),
|
|
1631
|
+
Index({ name: "cpq_qpa_quote_idx", properties: ["organizationId", "tenantId", "quoteId"] })
|
|
1632
|
+
], CpqQuotePriceAdjustment);
|
|
1537
1633
|
export {
|
|
1538
1634
|
CpqBundleSlot,
|
|
1539
1635
|
CpqInventoryAsset,
|
|
@@ -1552,6 +1648,7 @@ export {
|
|
|
1552
1648
|
CpqProductSpecification,
|
|
1553
1649
|
CpqQuoteConfiguration,
|
|
1554
1650
|
CpqQuoteLineConfiguration,
|
|
1651
|
+
CpqQuotePriceAdjustment,
|
|
1555
1652
|
CpqQuoteTargetSubscription,
|
|
1556
1653
|
CpqSubscriptionChangeLog,
|
|
1557
1654
|
CpqWizardDefinition
|