@managesome/eposmatic-toolkit 0.4.8 → 0.4.10
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/esm/constants/MATERIALIZED_REPORTS.js +448 -0
- package/esm/constants/enums/communications.js +1 -0
- package/esm/helpers/index.js +3 -0
- package/esm/helpers/materialized-reports/index.js +32 -0
- package/esm/helpers/materialized-reports/materialized-cash-accumulator-helpers.js +114 -0
- package/esm/helpers/materialized-reports/materialized-cash-classification-helpers.js +286 -0
- package/esm/helpers/materialized-reports/materialized-cash-close-day-helpers.js +396 -0
- package/esm/helpers/materialized-reports/materialized-cash-compile-helpers.js +244 -0
- package/esm/helpers/materialized-reports/materialized-delivery-accumulator-helpers.js +170 -0
- package/esm/helpers/materialized-reports/materialized-delivery-classification-helpers.js +426 -0
- package/esm/helpers/materialized-reports/materialized-delivery-close-day-helpers.js +372 -0
- package/esm/helpers/materialized-reports/materialized-delivery-compile-helpers.js +214 -0
- package/esm/helpers/materialized-reports/materialized-discount-accumulator-helpers.js +318 -0
- package/esm/helpers/materialized-reports/materialized-discount-classification-helpers.js +213 -0
- package/esm/helpers/materialized-reports/materialized-discount-close-day-helpers.js +604 -0
- package/esm/helpers/materialized-reports/materialized-discount-compile-helpers.js +186 -0
- package/esm/helpers/materialized-reports/materialized-hourly-comparison-close-day-helpers.js +155 -0
- package/esm/helpers/materialized-reports/materialized-hourly-comparison-compile-helpers.js +199 -0
- package/esm/helpers/materialized-reports/materialized-hourly-comparison-selection-helpers.js +111 -0
- package/esm/helpers/materialized-reports/materialized-payments-comparison-accumulator-helpers.js +88 -0
- package/esm/helpers/materialized-reports/materialized-payments-comparison-close-day-helpers.js +394 -0
- package/esm/helpers/materialized-reports/materialized-payments-comparison-compile-helpers.js +167 -0
- package/esm/helpers/materialized-reports/materialized-prep-time-classification-helpers.js +215 -0
- package/esm/helpers/materialized-reports/materialized-prep-time-close-day-helpers.js +476 -0
- package/esm/helpers/materialized-reports/materialized-prep-time-compile-helpers.js +201 -0
- package/esm/helpers/materialized-reports/materialized-reports-selection-helpers.js +7 -0
- package/esm/helpers/materialized-reports/materialized-sales-comparison-accumulator-helpers.js +189 -0
- package/esm/helpers/materialized-reports/materialized-sales-comparison-baseline-helpers.js +157 -0
- package/esm/helpers/materialized-reports/materialized-sales-comparison-close-day-helpers.js +588 -0
- package/esm/helpers/materialized-reports/materialized-sales-comparison-compile-helpers.js +175 -0
- package/esm/helpers/materialized-reports/tenant-cash-in-out-formatter.js +156 -0
- package/esm/helpers/materialized-reports/tenant-delivery-formatter.js +230 -0
- package/esm/helpers/materialized-reports/tenant-discount-formatter.js +427 -0
- package/esm/helpers/materialized-reports/tenant-hourly-comparison-formatter.js +237 -0
- package/esm/helpers/materialized-reports/tenant-payments-comparison-formatter.js +279 -0
- package/esm/helpers/materialized-reports/tenant-prep-time-formatter.js +228 -0
- package/esm/helpers/materialized-reports/tenant-sales-comparison-formatter.js +343 -0
- package/esm/helpers/reporting-contract/index.js +2 -0
- package/esm/helpers/reporting-contract/overview-contract.js +122 -0
- package/esm/helpers/reporting-contract/report-contract.js +228 -0
- package/esm/helpers/rider-earnings/index.js +1 -0
- package/esm/helpers/rider-earnings/rider-earnings.js +59 -0
- package/esm/helpers/rider-reports/index.js +2 -0
- package/esm/helpers/rider-reports/rider-daily-report.js +90 -0
- package/esm/helpers/rider-reports/rider-report.js +67 -0
- package/esm/schemas/models/deliveries.js +75 -0
- package/esm/schemas/models/index.js +15 -0
- package/esm/schemas/models/materialized_rider_daily_reports.js +39 -0
- package/esm/schemas/models/materialized_tenant_cash_entries.js +95 -0
- package/esm/schemas/models/materialized_tenant_cash_reports.js +77 -0
- package/esm/schemas/models/materialized_tenant_delivery_entries.js +63 -0
- package/esm/schemas/models/materialized_tenant_delivery_reports.js +63 -0
- package/esm/schemas/models/materialized_tenant_discount_entries.js +156 -0
- package/esm/schemas/models/materialized_tenant_discount_reports.js +333 -0
- package/esm/schemas/models/materialized_tenant_hourly_comparison_entries.js +87 -0
- package/esm/schemas/models/materialized_tenant_hourly_comparison_reports.js +99 -0
- package/esm/schemas/models/materialized_tenant_payments_comparison_entries.js +71 -0
- package/esm/schemas/models/materialized_tenant_payments_comparison_reports.js +76 -0
- package/esm/schemas/models/materialized_tenant_prep_time_entries.js +130 -0
- package/esm/schemas/models/materialized_tenant_prep_time_reports.js +109 -0
- package/esm/schemas/models/materialized_tenant_sales_comparison_entries.js +130 -0
- package/esm/schemas/models/materialized_tenant_sales_comparison_reports.js +154 -0
- package/esm/schemas/types/index.js +15 -0
- package/esm/schemas/types/materialized_rider_daily_reports.js +1 -0
- package/esm/schemas/types/materialized_tenant_cash_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_cash_reports.js +1 -0
- package/esm/schemas/types/materialized_tenant_delivery_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_delivery_reports.js +1 -0
- package/esm/schemas/types/materialized_tenant_discount_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_discount_reports.js +2 -0
- package/esm/schemas/types/materialized_tenant_hourly_comparison_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_hourly_comparison_reports.js +1 -0
- package/esm/schemas/types/materialized_tenant_payments_comparison_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_payments_comparison_reports.js +11 -0
- package/esm/schemas/types/materialized_tenant_prep_time_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_prep_time_reports.js +1 -0
- package/esm/schemas/types/materialized_tenant_sales_comparison_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_sales_comparison_reports.js +14 -0
- package/lib/constants/MATERIALIZED_REPORTS.d.ts +339 -2
- package/lib/constants/MATERIALIZED_REPORTS.js +450 -1
- package/lib/constants/enums/communications.d.ts +1 -0
- package/lib/constants/enums/communications.js +2 -1
- package/lib/helpers/index.d.ts +3 -0
- package/lib/helpers/index.js +3 -0
- package/lib/helpers/materialized-reports/index.d.ts +32 -0
- package/lib/helpers/materialized-reports/index.js +32 -0
- package/lib/helpers/materialized-reports/materialized-cash-accumulator-helpers.d.ts +18 -0
- package/lib/helpers/materialized-reports/materialized-cash-accumulator-helpers.js +118 -0
- package/lib/helpers/materialized-reports/materialized-cash-classification-helpers.d.ts +90 -0
- package/lib/helpers/materialized-reports/materialized-cash-classification-helpers.js +295 -0
- package/lib/helpers/materialized-reports/materialized-cash-close-day-helpers.d.ts +102 -0
- package/lib/helpers/materialized-reports/materialized-cash-close-day-helpers.js +409 -0
- package/lib/helpers/materialized-reports/materialized-cash-compile-helpers.d.ts +72 -0
- package/lib/helpers/materialized-reports/materialized-cash-compile-helpers.js +251 -0
- package/lib/helpers/materialized-reports/materialized-delivery-accumulator-helpers.d.ts +7 -0
- package/lib/helpers/materialized-reports/materialized-delivery-accumulator-helpers.js +173 -0
- package/lib/helpers/materialized-reports/materialized-delivery-classification-helpers.d.ts +84 -0
- package/lib/helpers/materialized-reports/materialized-delivery-classification-helpers.js +438 -0
- package/lib/helpers/materialized-reports/materialized-delivery-close-day-helpers.d.ts +97 -0
- package/lib/helpers/materialized-reports/materialized-delivery-close-day-helpers.js +385 -0
- package/lib/helpers/materialized-reports/materialized-delivery-compile-helpers.d.ts +40 -0
- package/lib/helpers/materialized-reports/materialized-delivery-compile-helpers.js +218 -0
- package/lib/helpers/materialized-reports/materialized-discount-accumulator-helpers.d.ts +52 -0
- package/lib/helpers/materialized-reports/materialized-discount-accumulator-helpers.js +324 -0
- package/lib/helpers/materialized-reports/materialized-discount-classification-helpers.d.ts +50 -0
- package/lib/helpers/materialized-reports/materialized-discount-classification-helpers.js +222 -0
- package/lib/helpers/materialized-reports/materialized-discount-close-day-helpers.d.ts +182 -0
- package/lib/helpers/materialized-reports/materialized-discount-close-day-helpers.js +615 -0
- package/lib/helpers/materialized-reports/materialized-discount-compile-helpers.d.ts +47 -0
- package/lib/helpers/materialized-reports/materialized-discount-compile-helpers.js +193 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-close-day-helpers.d.ts +64 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-close-day-helpers.js +163 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-compile-helpers.d.ts +61 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-compile-helpers.js +207 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-selection-helpers.d.ts +23 -0
- package/lib/helpers/materialized-reports/materialized-hourly-comparison-selection-helpers.js +116 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-accumulator-helpers.d.ts +25 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-accumulator-helpers.js +98 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-close-day-helpers.d.ts +79 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-close-day-helpers.js +407 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-compile-helpers.d.ts +35 -0
- package/lib/helpers/materialized-reports/materialized-payments-comparison-compile-helpers.js +173 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-classification-helpers.d.ts +66 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-classification-helpers.js +224 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-close-day-helpers.d.ts +128 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-close-day-helpers.js +490 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-compile-helpers.d.ts +46 -0
- package/lib/helpers/materialized-reports/materialized-prep-time-compile-helpers.js +208 -0
- package/lib/helpers/materialized-reports/materialized-reports-selection-helpers.d.ts +8 -0
- package/lib/helpers/materialized-reports/materialized-reports-selection-helpers.js +8 -1
- package/lib/helpers/materialized-reports/materialized-sales-comparison-accumulator-helpers.d.ts +48 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-accumulator-helpers.js +204 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-baseline-helpers.d.ts +22 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-baseline-helpers.js +161 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-close-day-helpers.d.ts +163 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-close-day-helpers.js +603 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-compile-helpers.d.ts +68 -0
- package/lib/helpers/materialized-reports/materialized-sales-comparison-compile-helpers.js +182 -0
- package/lib/helpers/materialized-reports/tenant-cash-in-out-formatter.d.ts +98 -0
- package/lib/helpers/materialized-reports/tenant-cash-in-out-formatter.js +159 -0
- package/lib/helpers/materialized-reports/tenant-delivery-formatter.d.ts +133 -0
- package/lib/helpers/materialized-reports/tenant-delivery-formatter.js +233 -0
- package/lib/helpers/materialized-reports/tenant-discount-formatter.d.ts +114 -0
- package/lib/helpers/materialized-reports/tenant-discount-formatter.js +431 -0
- package/lib/helpers/materialized-reports/tenant-hourly-comparison-formatter.d.ts +60 -0
- package/lib/helpers/materialized-reports/tenant-hourly-comparison-formatter.js +243 -0
- package/lib/helpers/materialized-reports/tenant-payments-comparison-formatter.d.ts +75 -0
- package/lib/helpers/materialized-reports/tenant-payments-comparison-formatter.js +286 -0
- package/lib/helpers/materialized-reports/tenant-prep-time-formatter.d.ts +97 -0
- package/lib/helpers/materialized-reports/tenant-prep-time-formatter.js +232 -0
- package/lib/helpers/materialized-reports/tenant-sales-comparison-formatter.d.ts +105 -0
- package/lib/helpers/materialized-reports/tenant-sales-comparison-formatter.js +349 -0
- package/lib/helpers/reporting-contract/index.d.ts +2 -0
- package/lib/helpers/reporting-contract/index.js +18 -0
- package/lib/helpers/reporting-contract/overview-contract.d.ts +55 -0
- package/lib/helpers/reporting-contract/overview-contract.js +126 -0
- package/lib/helpers/reporting-contract/report-contract.d.ts +159 -0
- package/lib/helpers/reporting-contract/report-contract.js +239 -0
- package/lib/helpers/rider-earnings/index.d.ts +1 -0
- package/lib/helpers/rider-earnings/index.js +17 -0
- package/lib/helpers/rider-earnings/rider-earnings.d.ts +58 -0
- package/lib/helpers/rider-earnings/rider-earnings.js +64 -0
- package/lib/helpers/rider-reports/index.d.ts +2 -0
- package/lib/helpers/rider-reports/index.js +18 -0
- package/lib/helpers/rider-reports/rider-daily-report.d.ts +26 -0
- package/lib/helpers/rider-reports/rider-daily-report.js +93 -0
- package/lib/helpers/rider-reports/rider-report.d.ts +49 -0
- package/lib/helpers/rider-reports/rider-report.js +70 -0
- package/lib/helpers/types/materialized-reports-apis.d.ts +297 -1
- package/lib/schemas/models/deliveries.d.ts +54 -0
- package/lib/schemas/models/deliveries.js +75 -0
- package/lib/schemas/models/expense_details.d.ts +3 -3
- package/lib/schemas/models/index.d.ts +15 -0
- package/lib/schemas/models/index.js +15 -0
- package/lib/schemas/models/materialized_rider_daily_reports.d.ts +27 -0
- package/lib/schemas/models/materialized_rider_daily_reports.js +42 -0
- package/lib/schemas/models/materialized_tenant_cash_entries.d.ts +181 -0
- package/lib/schemas/models/materialized_tenant_cash_entries.js +98 -0
- package/lib/schemas/models/materialized_tenant_cash_reports.d.ts +111 -0
- package/lib/schemas/models/materialized_tenant_cash_reports.js +80 -0
- package/lib/schemas/models/materialized_tenant_delivery_entries.d.ts +98 -0
- package/lib/schemas/models/materialized_tenant_delivery_entries.js +66 -0
- package/lib/schemas/models/materialized_tenant_delivery_reports.d.ts +98 -0
- package/lib/schemas/models/materialized_tenant_delivery_reports.js +66 -0
- package/lib/schemas/models/materialized_tenant_discount_entries.d.ts +199 -0
- package/lib/schemas/models/materialized_tenant_discount_entries.js +159 -0
- package/lib/schemas/models/materialized_tenant_discount_reports.d.ts +216 -0
- package/lib/schemas/models/materialized_tenant_discount_reports.js +336 -0
- package/lib/schemas/models/materialized_tenant_hourly_comparison_entries.d.ts +95 -0
- package/lib/schemas/models/materialized_tenant_hourly_comparison_entries.js +82 -0
- package/lib/schemas/models/materialized_tenant_hourly_comparison_reports.d.ts +105 -0
- package/lib/schemas/models/materialized_tenant_hourly_comparison_reports.js +91 -0
- package/lib/schemas/models/materialized_tenant_payments_comparison_entries.d.ts +91 -0
- package/lib/schemas/models/materialized_tenant_payments_comparison_entries.js +70 -0
- package/lib/schemas/models/materialized_tenant_payments_comparison_reports.d.ts +98 -0
- package/lib/schemas/models/materialized_tenant_payments_comparison_reports.js +71 -0
- package/lib/schemas/models/materialized_tenant_prep_time_entries.d.ts +181 -0
- package/lib/schemas/models/materialized_tenant_prep_time_entries.js +133 -0
- package/lib/schemas/models/materialized_tenant_prep_time_reports.d.ts +118 -0
- package/lib/schemas/models/materialized_tenant_prep_time_reports.js +112 -0
- package/lib/schemas/models/materialized_tenant_sales_comparison_entries.d.ts +139 -0
- package/lib/schemas/models/materialized_tenant_sales_comparison_entries.js +120 -0
- package/lib/schemas/models/materialized_tenant_sales_comparison_reports.d.ts +167 -0
- package/lib/schemas/models/materialized_tenant_sales_comparison_reports.js +137 -0
- package/lib/schemas/models/tenant_purchase_order_vendor_returns.d.ts +3 -3
- package/lib/schemas/models/warehouse_internal_movements.d.ts +6 -6
- package/lib/schemas/models/warehouse_purchase_order_receipts.d.ts +3 -3
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +3 -3
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +6 -6
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +3 -3
- package/lib/schemas/types/deliveries.d.ts +40 -1
- package/lib/schemas/types/index.d.ts +15 -0
- package/lib/schemas/types/index.js +15 -0
- package/lib/schemas/types/materialized_rider_daily_reports.d.ts +37 -0
- package/lib/schemas/types/materialized_rider_daily_reports.js +2 -0
- package/lib/schemas/types/materialized_tenant_cash_entries.d.ts +87 -0
- package/lib/schemas/types/materialized_tenant_cash_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_cash_reports.d.ts +144 -0
- package/lib/schemas/types/materialized_tenant_cash_reports.js +2 -0
- package/lib/schemas/types/materialized_tenant_delivery_entries.d.ts +98 -0
- package/lib/schemas/types/materialized_tenant_delivery_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_delivery_reports.d.ts +179 -0
- package/lib/schemas/types/materialized_tenant_delivery_reports.js +2 -0
- package/lib/schemas/types/materialized_tenant_discount_entries.d.ts +81 -0
- package/lib/schemas/types/materialized_tenant_discount_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_discount_reports.d.ts +209 -0
- package/lib/schemas/types/materialized_tenant_discount_reports.js +3 -0
- package/lib/schemas/types/materialized_tenant_hourly_comparison_entries.d.ts +33 -0
- package/lib/schemas/types/materialized_tenant_hourly_comparison_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_hourly_comparison_reports.d.ts +40 -0
- package/lib/schemas/types/materialized_tenant_hourly_comparison_reports.js +2 -0
- package/lib/schemas/types/materialized_tenant_payments_comparison_entries.d.ts +48 -0
- package/lib/schemas/types/materialized_tenant_payments_comparison_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_payments_comparison_reports.d.ts +51 -0
- package/lib/schemas/types/materialized_tenant_payments_comparison_reports.js +14 -0
- package/lib/schemas/types/materialized_tenant_prep_time_entries.d.ts +88 -0
- package/lib/schemas/types/materialized_tenant_prep_time_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_prep_time_reports.d.ts +132 -0
- package/lib/schemas/types/materialized_tenant_prep_time_reports.js +2 -0
- package/lib/schemas/types/materialized_tenant_sales_comparison_entries.d.ts +43 -0
- package/lib/schemas/types/materialized_tenant_sales_comparison_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_sales_comparison_reports.d.ts +74 -0
- package/lib/schemas/types/materialized_tenant_sales_comparison_reports.js +17 -0
- package/lib/tests/materialized-reports/analytics-growth-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/analytics-overview-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/analytics-performance-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/fixtures.d.ts +15 -1
- package/lib/tests/materialized-reports/fixtures.js +1 -0
- package/lib/tests/materialized-reports/materialized-cash-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-cash-compile.test.js +196 -0
- package/lib/tests/materialized-reports/materialized-cash-fold.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-cash-fold.test.js +116 -0
- package/lib/tests/materialized-reports/materialized-cash-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-cash-formatter.test.js +152 -0
- package/lib/tests/materialized-reports/materialized-cash-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-cash-plan.test.js +168 -0
- package/lib/tests/materialized-reports/materialized-cash-reconciliation.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-cash-reconciliation.test.js +267 -0
- package/lib/tests/materialized-reports/materialized-delivery-accumulation.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-delivery-accumulation.test.js +147 -0
- package/lib/tests/materialized-reports/materialized-delivery-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-delivery-compile.test.js +241 -0
- package/lib/tests/materialized-reports/materialized-delivery-fold.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-delivery-fold.test.js +109 -0
- package/lib/tests/materialized-reports/materialized-delivery-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-delivery-formatter.test.js +141 -0
- package/lib/tests/materialized-reports/materialized-delivery-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-delivery-plan.test.js +198 -0
- package/lib/tests/materialized-reports/materialized-discount-aggregated-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-aggregated-formatter.test.js +173 -0
- package/lib/tests/materialized-reports/materialized-discount-classification.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-classification.test.js +339 -0
- package/lib/tests/materialized-reports/materialized-discount-close-day.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-close-day.test.js +506 -0
- package/lib/tests/materialized-reports/materialized-discount-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-compile.test.js +161 -0
- package/lib/tests/materialized-reports/materialized-discount-counter-rows.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-counter-rows.test.js +107 -0
- package/lib/tests/materialized-reports/materialized-discount-entries-accumulation.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-discount-entries-accumulation.test.js +125 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-compile.test.js +146 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-formatter.test.js +127 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-plan.test.js +138 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-selection.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-hourly-comparison-selection.test.js +90 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-compile.test.js +164 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-formatter.test.js +117 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-payments-comparison-plan.test.js +149 -0
- package/lib/tests/materialized-reports/materialized-prep-time-classification.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-prep-time-classification.test.js +273 -0
- package/lib/tests/materialized-reports/materialized-prep-time-close-day.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-prep-time-close-day.test.js +270 -0
- package/lib/tests/materialized-reports/materialized-prep-time-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-prep-time-compile.test.js +217 -0
- package/lib/tests/materialized-reports/materialized-prep-time-constants.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-prep-time-constants.test.js +84 -0
- package/lib/tests/materialized-reports/materialized-prep-time-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-prep-time-plan.test.js +176 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-baseline.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-baseline.test.js +126 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-compile.test.js +206 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-formatter.test.js +179 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-parity.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-parity.test.js +196 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-sales-comparison-plan.test.js +241 -0
- package/lib/tests/materialized-reports/materialized-tenant-hourly-comparison-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-hourly-comparison-schema.test.js +96 -0
- package/lib/tests/materialized-reports/materialized-tenant-payments-comparison-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-payments-comparison-schema.test.js +112 -0
- package/lib/tests/materialized-reports/materialized-tenant-sales-comparison-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-sales-comparison-schema.test.js +142 -0
- package/lib/tests/materialized-reports/materialized-tenant-sales-overview-reports-schema.test.js +8 -1
- package/lib/tests/materialized-reports/sales-comparison-reference.d.ts +55 -0
- package/lib/tests/materialized-reports/sales-comparison-reference.js +86 -0
- package/lib/tests/materialized-reports/tenant-discount-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/tenant-discount-formatter.test.js +289 -0
- package/lib/tests/materialized-reports/tenant-prep-time-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/tenant-prep-time-formatter.test.js +354 -0
- package/lib/tests/reporting-contract.test.d.ts +1 -0
- package/lib/tests/reporting-contract.test.js +267 -0
- package/lib/tests/rider-daily-report.test.d.ts +1 -0
- package/lib/tests/rider-daily-report.test.js +86 -0
- package/lib/tests/rider-earnings.test.d.ts +1 -0
- package/lib/tests/rider-earnings.test.js +65 -0
- package/lib/tests/rider-report.test.d.ts +1 -0
- package/lib/tests/rider-report.test.js +98 -0
- package/package.json +10 -1
|
@@ -77,11 +77,102 @@ export declare const MATERIALIZED_CREDIT_BILLS_SCOPES: MATERIALIZED_REPORT_SCOPE
|
|
|
77
77
|
*/
|
|
78
78
|
export declare enum MATERIALIZED_REPORT_KEY_FILTER_ENUM {
|
|
79
79
|
ORDER_STATUS = "ORDER_STATUS",
|
|
80
|
-
PLATFORM = "PLATFORM"
|
|
80
|
+
PLATFORM = "PLATFORM",
|
|
81
|
+
DRAWER_ID = "DRAWER_ID",
|
|
82
|
+
REF_TYPE = "REF_TYPE",
|
|
83
|
+
CITY = "CITY",
|
|
84
|
+
PAYMENT_METHOD = "PAYMENT_METHOD"
|
|
81
85
|
}
|
|
82
86
|
export declare const ALL_MATERIALIZED_REPORT_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
83
87
|
/** Ordered key filters of the tenant sales overview report (`PLACED:POS_WALK-IN`). */
|
|
84
88
|
export declare const SALES_OVERVIEW_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
89
|
+
/**
|
|
90
|
+
* Scopes materialized by `materialized_tenant_discount_reports` — the same
|
|
91
|
+
* month-capped set as the credit ledger, for the same reason: the itemized
|
|
92
|
+
* discount rows live in the SIBLING entries collection
|
|
93
|
+
* (`materialized_tenant_discount_entries`), capped at `LOCAL_MONTH` so a
|
|
94
|
+
* document can never grow unboundedly.
|
|
95
|
+
*
|
|
96
|
+
* The report documents themselves are COUNTERS ONLY (see
|
|
97
|
+
* `schemas/types/materialized_tenant_discount_reports.ts`).
|
|
98
|
+
*/
|
|
99
|
+
export declare const MATERIALIZED_DISCOUNT_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
100
|
+
/** Ordered key filters of the discounts report (`COMPLETED:POS_WALK-IN`). */
|
|
101
|
+
export declare const DISCOUNTS_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
102
|
+
/**
|
|
103
|
+
* Discount SLOT of one row — mirrors the three slots of the order/item
|
|
104
|
+
* `IDiscountDetails` (`special_`, `loyalty_`, `voucher_`).
|
|
105
|
+
*/
|
|
106
|
+
export declare enum MATERIALIZED_DISCOUNT_SLOT_ENUM {
|
|
107
|
+
SPECIAL = "SPECIAL",
|
|
108
|
+
LOYALTY = "LOYALTY",
|
|
109
|
+
VOUCHER = "VOUCHER"
|
|
110
|
+
}
|
|
111
|
+
export declare const ALL_MATERIALIZED_DISCOUNT_SLOTS: MATERIALIZED_DISCOUNT_SLOT_ENUM[];
|
|
112
|
+
/**
|
|
113
|
+
* Sub-kind of a discount row, derived from the slot's ID SHAPE (the only
|
|
114
|
+
* discriminator the write path stores — verified against live fixtures):
|
|
115
|
+
*
|
|
116
|
+
* - `COLLECTION` — `special_discount_id` is a 24-hex ObjectId (a
|
|
117
|
+
* `discounts` collection document).
|
|
118
|
+
* - `MANUAL` — id starts `MANUAL_` (quick % / custom amount /
|
|
119
|
+
* payment-type discounts). NOT `MANUAL_SINGLE_`.
|
|
120
|
+
* - `PRICE_OVERRIDE` — id starts `MANUAL_SINGLE_` (item price override).
|
|
121
|
+
* - `CATALOG_ITEM` — id is an item id or `SPECIAL_DISCOUNT` (a catalog
|
|
122
|
+
* item's own configured discount).
|
|
123
|
+
* - `OFFER` — loyalty/voucher slot whose id is an offer ObjectId.
|
|
124
|
+
* - `GIFT_CARD` — loyalty slot whose id is a gift-card ObjectId (the
|
|
125
|
+
* reference number carries the code).
|
|
126
|
+
* - `WALLET_CASHBACK` — the sentinel id `wallet_cashback_redemption`.
|
|
127
|
+
* - `UNATTRIBUTED` — no usable slot id, or order-level money the slots
|
|
128
|
+
* cannot explain (see the counter type).
|
|
129
|
+
*/
|
|
130
|
+
export declare enum MATERIALIZED_DISCOUNT_SUB_KIND_ENUM {
|
|
131
|
+
COLLECTION = "COLLECTION",
|
|
132
|
+
MANUAL = "MANUAL",
|
|
133
|
+
PRICE_OVERRIDE = "PRICE_OVERRIDE",
|
|
134
|
+
CATALOG_ITEM = "CATALOG_ITEM",
|
|
135
|
+
OFFER = "OFFER",
|
|
136
|
+
GIFT_CARD = "GIFT_CARD",
|
|
137
|
+
WALLET_CASHBACK = "WALLET_CASHBACK",
|
|
138
|
+
UNATTRIBUTED = "UNATTRIBUTED"
|
|
139
|
+
}
|
|
140
|
+
export declare const ALL_MATERIALIZED_DISCOUNT_SUB_KINDS: MATERIALIZED_DISCOUNT_SUB_KIND_ENUM[];
|
|
141
|
+
/**
|
|
142
|
+
* Kind of one itemized discount row in
|
|
143
|
+
* `materialized_tenant_discount_entries`.
|
|
144
|
+
*
|
|
145
|
+
* - `DISCOUNT` — a slot on the order or on one item.
|
|
146
|
+
* - `FREE_ITEM` — a 100 % item row (also present as a `DISCOUNT` row; the
|
|
147
|
+
* drill-down decides which view lists it).
|
|
148
|
+
* - `COMPLIMENTARY` — a `COMPLIMENTARY` payment (no discount slot required).
|
|
149
|
+
*/
|
|
150
|
+
export declare enum MATERIALIZED_DISCOUNT_ENTRY_KIND_ENUM {
|
|
151
|
+
DISCOUNT = "DISCOUNT",
|
|
152
|
+
FREE_ITEM = "FREE_ITEM",
|
|
153
|
+
COMPLIMENTARY = "COMPLIMENTARY"
|
|
154
|
+
}
|
|
155
|
+
export declare const ALL_MATERIALIZED_DISCOUNT_ENTRY_KINDS: MATERIALIZED_DISCOUNT_ENTRY_KIND_ENUM[];
|
|
156
|
+
/** Level a discount applies at — the order, one item, or a payment. */
|
|
157
|
+
export declare enum MATERIALIZED_DISCOUNT_LEVEL_ENUM {
|
|
158
|
+
ORDER = "ORDER",
|
|
159
|
+
ITEM = "ITEM",
|
|
160
|
+
PAYMENT = "PAYMENT"
|
|
161
|
+
}
|
|
162
|
+
export declare const ALL_MATERIALIZED_DISCOUNT_LEVELS: MATERIALIZED_DISCOUNT_LEVEL_ENUM[];
|
|
163
|
+
/**
|
|
164
|
+
* Cap of a discount report document's `top_sources` leaderboard. Display-only:
|
|
165
|
+
* every number in that list is also derivable from `discount_counters`, so a
|
|
166
|
+
* truncated list can never change a total.
|
|
167
|
+
*/
|
|
168
|
+
export declare const MATERIALIZED_DISCOUNT_SOURCE_LIMIT = 12;
|
|
169
|
+
/**
|
|
170
|
+
* The gift-card / wallet sentinel ids the toolkit writes into discount slots.
|
|
171
|
+
* Kept here so the classifier and the writers cannot drift apart.
|
|
172
|
+
*/
|
|
173
|
+
export declare const MATERIALIZED_DISCOUNT_SPECIAL_DISCOUNT_ID = "SPECIAL_DISCOUNT";
|
|
174
|
+
export declare const MATERIALIZED_DISCOUNT_MANUAL_PREFIX = "MANUAL_";
|
|
175
|
+
export declare const MATERIALIZED_DISCOUNT_PRICE_OVERRIDE_PREFIX = "MANUAL_SINGLE_";
|
|
85
176
|
/**
|
|
86
177
|
* Payment-type label used by the frontend report formatter for the derived
|
|
87
178
|
* credit-settlement line in a collection day's payments breakdown (a
|
|
@@ -107,6 +198,138 @@ export declare enum MATERIALIZED_REPORT_CREDIT_BILL_EVENT_TYPE_ENUM {
|
|
|
107
198
|
WRITE_OFF = "WRITE_OFF"
|
|
108
199
|
}
|
|
109
200
|
export declare const ALL_MATERIALIZED_REPORT_CREDIT_BILL_EVENT_TYPES: MATERIALIZED_REPORT_CREDIT_BILL_EVENT_TYPE_ENUM[];
|
|
201
|
+
/**
|
|
202
|
+
* Scopes materialized by `materialized_tenant_cash_in_out_reports`.
|
|
203
|
+
*
|
|
204
|
+
* NO `localHour`: cash is a close-of-shift concern, the same reasoning that keeps
|
|
205
|
+
* the hour scope out of the prep time report. Day + periods, capped at
|
|
206
|
+
* `LOCAL_MONTH` because the statement rows live in the SIBLING entries collection
|
|
207
|
+
* (`materialized_tenant_cash_in_out_entries`).
|
|
208
|
+
*/
|
|
209
|
+
export declare const MATERIALIZED_CASH_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
210
|
+
/**
|
|
211
|
+
* Ordered key filters of the cash report - `<DRAWER_ID>:<REF_TYPE>` (decision
|
|
212
|
+
* (b3)). Shift ids are deliberately NOT a key dimension: they are
|
|
213
|
+
* high-cardinality and belong in a breakdown table, not in the key.
|
|
214
|
+
*/
|
|
215
|
+
export declare const CASH_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
216
|
+
/** Cap of the per-document drawer leaderboard (bounded, display-only). */
|
|
217
|
+
export declare const MATERIALIZED_CASH_SOURCE_LIMIT = 12;
|
|
218
|
+
/**
|
|
219
|
+
* Scopes materialized by `materialized_tenant_delivery_reports`.
|
|
220
|
+
*
|
|
221
|
+
* NO `localHour`: the hour dimension appears as an AREA HEAT MAP inside the document
|
|
222
|
+
* (`areas[city].by_hour`), which is the shape the page actually renders. Materializing
|
|
223
|
+
* a full hour scope as well would multiply documents for a view nobody opens.
|
|
224
|
+
*/
|
|
225
|
+
export declare const MATERIALIZED_DELIVERY_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
226
|
+
/**
|
|
227
|
+
* Ordered key filters of the delivery report - `<PLATFORM>:<CITY>` (decision (b4)).
|
|
228
|
+
*
|
|
229
|
+
* Rider is deliberately NOT a key dimension: rider ids are high-cardinality, so rider
|
|
230
|
+
* analysis is a bounded `riders` map INSIDE each document rather than a partition of
|
|
231
|
+
* the key space.
|
|
232
|
+
*/
|
|
233
|
+
export declare const DELIVERY_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
234
|
+
/**
|
|
235
|
+
* Distance histogram of the delivery report, in METRES: inclusive lower, EXCLUSIVE
|
|
236
|
+
* upper, with an open-ended top bucket.
|
|
237
|
+
*
|
|
238
|
+
* Fixed buckets rather than a raw array, for the same reason as the prep time report: a
|
|
239
|
+
* bounded shape keeps a document small and makes a period fold exact.
|
|
240
|
+
*/
|
|
241
|
+
export declare const MATERIALIZED_DELIVERY_DISTANCE_BUCKETS: {
|
|
242
|
+
key: string;
|
|
243
|
+
min: number;
|
|
244
|
+
max: number | null;
|
|
245
|
+
}[];
|
|
246
|
+
/** Cap of the per-document rider leaderboard (bounded, display-only). */
|
|
247
|
+
export declare const MATERIALIZED_DELIVERY_RIDER_LIMIT = 50;
|
|
248
|
+
/** Cap of the per-document area leaderboard (bounded, display-only). */
|
|
249
|
+
export declare const MATERIALIZED_DELIVERY_AREA_LIMIT = 50;
|
|
250
|
+
/**
|
|
251
|
+
* Scopes materialized by `materialized_tenant_prep_time_reports`.
|
|
252
|
+
*
|
|
253
|
+
* NO `localHour` (decision h2): the tracked population per hour is 2-3 items in
|
|
254
|
+
* the dev stores, so an hourly prep time would be noise. Day + periods only,
|
|
255
|
+
* capped at `LOCAL_MONTH` because the itemized rows live in the SIBLING entries
|
|
256
|
+
* collection (`materialized_tenant_prep_time_entries`).
|
|
257
|
+
*/
|
|
258
|
+
export declare const MATERIALIZED_PREP_TIME_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
259
|
+
/** Ordered key filters of the prep time report (`COMPLETED:POS_WALK-IN`). */
|
|
260
|
+
export declare const PREP_TIME_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
261
|
+
/**
|
|
262
|
+
* ANCHOR PROVENANCE of one tracked item - the split that makes this report
|
|
263
|
+
* correct (decision b2, section 3.2.1 of the concept doc).
|
|
264
|
+
*
|
|
265
|
+
* `ready_minutes` is written from the chain
|
|
266
|
+
* `prep_started_at ?? order_status_updated_at ?? createdAt`, and the two
|
|
267
|
+
* populations behave completely differently:
|
|
268
|
+
*
|
|
269
|
+
* - MEASURED - `prep_started_at` AND `ready_minutes` both present. The item owns
|
|
270
|
+
* its prep clock, so the ready instant is reconstructible
|
|
271
|
+
* (`prep_started_at + ready_minutes`). Two independent stores AGREE here
|
|
272
|
+
* (avg ~9.3 min, median 5-8, p90 23, ~30% instant).
|
|
273
|
+
* - UNMEASURED - everything else, including `ready_minutes` with NO
|
|
274
|
+
* `prep_started_at`: the anchor fell back to the order stage and the value is
|
|
275
|
+
* degenerate (bruzo: avg 0.0, 99.8% zeros). Counted in COVERAGE only.
|
|
276
|
+
*
|
|
277
|
+
* Blending them under-reports the average by ~13x in the store with the MOST
|
|
278
|
+
* data (0.7 vs 9.2 min) - the single mistake this design exists to prevent.
|
|
279
|
+
*/
|
|
280
|
+
export declare enum MATERIALIZED_PREP_TIME_ANCHOR_ENUM {
|
|
281
|
+
MEASURED = "MEASURED",
|
|
282
|
+
UNMEASURED = "UNMEASURED"
|
|
283
|
+
}
|
|
284
|
+
export declare const ALL_MATERIALIZED_PREP_TIME_ANCHORS: MATERIALIZED_PREP_TIME_ANCHOR_ENUM[];
|
|
285
|
+
/**
|
|
286
|
+
* Fixed duration histogram of the MEASURED bucket, in minutes.
|
|
287
|
+
*
|
|
288
|
+
* A fixed histogram (decision d2) keeps documents small and is exactly what the
|
|
289
|
+
* UI renders; `median` / `p90` are derived from it and are therefore
|
|
290
|
+
* BUCKET-APPROXIMATE (the exact `avg` comes from `sum / count`). Storing every
|
|
291
|
+
* duration to get exact percentiles is the expensive option this avoids.
|
|
292
|
+
*/
|
|
293
|
+
export declare const MATERIALIZED_PREP_TIME_BUCKETS: {
|
|
294
|
+
label: string;
|
|
295
|
+
min: number;
|
|
296
|
+
max: number | null;
|
|
297
|
+
}[];
|
|
298
|
+
export declare const ALL_MATERIALIZED_PREP_TIME_BUCKET_LABELS: string[];
|
|
299
|
+
/**
|
|
300
|
+
* Longest prep duration (minutes) trusted as a real prep time. A stored
|
|
301
|
+
* `ready_minutes` beyond this is a clock/backfill artefact rather than a prep
|
|
302
|
+
* time, so it still lands in the top bucket (the counts stay honest) but is kept
|
|
303
|
+
* out of `sum` / `min` / `max` - the same defensive posture the other reports
|
|
304
|
+
* take with outlier inputs.
|
|
305
|
+
*/
|
|
306
|
+
export declare const MATERIALIZED_PREP_TIME_MAX_MINUTES: number;
|
|
307
|
+
/** Label of the top histogram bucket (everything at or above its `min`). */
|
|
308
|
+
export declare const MATERIALIZED_PREP_TIME_TOP_BUCKET = "60+";
|
|
309
|
+
/**
|
|
310
|
+
* On-time tolerance (decision f2): ready instant <= target counts as ON TIME
|
|
311
|
+
* (`delta <= 0`) for v1. The signed `delta_sum` is kept so a grace window can be
|
|
312
|
+
* applied later WITHOUT re-materializing.
|
|
313
|
+
*/
|
|
314
|
+
export declare const MATERIALIZED_PREP_TIME_ON_TIME_MAX_DELTA = 0;
|
|
315
|
+
/**
|
|
316
|
+
* WHERE an item's on-time target came from (decision e2).
|
|
317
|
+
*
|
|
318
|
+
* Promise-only grading would leave 63-97% of items ungraded (measured: only
|
|
319
|
+
* 2.7% / 36.2% of orders carry an explicit estimate), so an item with no promise
|
|
320
|
+
* is graded against the TENANT DEFAULT - the documented
|
|
321
|
+
* `getDeliveryExpectedTime` fallback chain. The baseline is labelled per row so
|
|
322
|
+
* a reader can always tell the two apart.
|
|
323
|
+
*/
|
|
324
|
+
export declare enum MATERIALIZED_PREP_TIME_TARGET_ENUM {
|
|
325
|
+
/** The order carried an explicit estimate. */
|
|
326
|
+
PROMISE = "PROMISE",
|
|
327
|
+
/** The order was ASAP and is graded against the tenant default. */
|
|
328
|
+
TENANT_DEFAULT = "TENANT_DEFAULT",
|
|
329
|
+
/** Neither exists - the row cannot be graded. */
|
|
330
|
+
NONE = "NONE"
|
|
331
|
+
}
|
|
332
|
+
export declare const ALL_MATERIALIZED_PREP_TIME_TARGETS: MATERIALIZED_PREP_TIME_TARGET_ENUM[];
|
|
110
333
|
/**
|
|
111
334
|
* Materialized report kinds — the discriminator stored on
|
|
112
335
|
* `materialized_tenant_reports_iterations` rows. A single shared history collection records
|
|
@@ -117,6 +340,120 @@ export declare const ALL_MATERIALIZED_REPORT_CREDIT_BILL_EVENT_TYPES: MATERIALIZ
|
|
|
117
340
|
*/
|
|
118
341
|
export declare enum MATERIALIZED_REPORT_TYPE_ENUM {
|
|
119
342
|
TENANT_SALES_OVERVIEW = "TENANT_SALES_OVERVIEW",
|
|
120
|
-
TENANT_CREDIT_BILLS = "TENANT_CREDIT_BILLS"
|
|
343
|
+
TENANT_CREDIT_BILLS = "TENANT_CREDIT_BILLS",
|
|
344
|
+
TENANT_DISCOUNT_REPORTS = "TENANT_DISCOUNT_REPORTS",
|
|
345
|
+
TENANT_DISCOUNT_ENTRIES = "TENANT_DISCOUNT_ENTRIES",
|
|
346
|
+
TENANT_PREP_TIME_REPORTS = "TENANT_PREP_TIME_REPORTS",
|
|
347
|
+
TENANT_PREP_TIME_ENTRIES = "TENANT_PREP_TIME_ENTRIES",
|
|
348
|
+
TENANT_CASH_REPORTS = "TENANT_CASH_REPORTS",
|
|
349
|
+
TENANT_CASH_ENTRIES = "TENANT_CASH_ENTRIES",
|
|
350
|
+
TENANT_DELIVERY_REPORTS = "TENANT_DELIVERY_REPORTS",
|
|
351
|
+
TENANT_DELIVERY_ENTRIES = "TENANT_DELIVERY_ENTRIES",
|
|
352
|
+
TENANT_SALES_COMPARISON_REPORTS = "TENANT_SALES_COMPARISON_REPORTS",
|
|
353
|
+
TENANT_SALES_COMPARISON_ENTRIES = "TENANT_SALES_COMPARISON_ENTRIES",
|
|
354
|
+
TENANT_HOURLY_COMPARISON_REPORTS = "TENANT_HOURLY_COMPARISON_REPORTS",
|
|
355
|
+
TENANT_HOURLY_COMPARISON_ENTRIES = "TENANT_HOURLY_COMPARISON_ENTRIES",
|
|
356
|
+
TENANT_PAYMENTS_COMPARISON_REPORTS = "TENANT_PAYMENTS_COMPARISON_REPORTS",
|
|
357
|
+
TENANT_PAYMENTS_COMPARISON_ENTRIES = "TENANT_PAYMENTS_COMPARISON_ENTRIES"
|
|
121
358
|
}
|
|
122
359
|
export declare const ALL_MATERIALIZED_REPORT_TYPES: MATERIALIZED_REPORT_TYPE_ENUM[];
|
|
360
|
+
/**
|
|
361
|
+
* Sales Comparison (see console/admin-panel/docs/report-sales-comparison-concept.md).
|
|
362
|
+
*
|
|
363
|
+
* A REPORT, not Analytics: it lives under Reports - New -> Comparisons and its numbers are
|
|
364
|
+
* decimal-exact. The comparison itself is never stored - `current` and `comparison` are two
|
|
365
|
+
* ordinary reads, subtracted in the formatter.
|
|
366
|
+
*
|
|
367
|
+
* Fixes no time bias: a complete business day (localDate) is the anchor, because the day
|
|
368
|
+
* close defines it. A range-based bias is meaningless once the business day exists.
|
|
369
|
+
*/
|
|
370
|
+
export declare const MATERIALIZED_TENANT_SALES_COMPARISON_REPORTS_COLLECTION_NAME = "materialized_tenant_sales_comparison_reports";
|
|
371
|
+
export declare const MATERIALIZED_TENANT_SALES_COMPARISON_ENTRIES_COLLECTION_NAME = "materialized_tenant_sales_comparison_entries";
|
|
372
|
+
/** Six grains. NO ISO week (owner decision) and NO hour - this is not the hourly report. */
|
|
373
|
+
export declare const MATERIALIZED_SALES_COMPARISON_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
374
|
+
/** Key grammar: `COMPLETED:POS_DINE-IN`. No sale-type dimension (owner decision). */
|
|
375
|
+
export declare const SALES_COMPARISON_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
376
|
+
export declare const MATERIALIZED_TENANT_SALES_COMPARISON_REPORTS_SCHEMA_VERSION = 1;
|
|
377
|
+
export declare const MATERIALIZED_TENANT_SALES_COMPARISON_ENTRIES_SCHEMA_VERSION = 1;
|
|
378
|
+
/**
|
|
379
|
+
* The baseline a Sales Comparison read is compared against (owner decision:
|
|
380
|
+
* Toast/Square behaviour). The user picks ONE range; the comparison range is
|
|
381
|
+
* DERIVED server-side:
|
|
382
|
+
* - `NONE` — no comparison series;
|
|
383
|
+
* - `PREVIOUS_PERIOD` — an EQUAL-LENGTH range immediately preceding the primary
|
|
384
|
+
* range (never "the previous calendar month" — that is the classic
|
|
385
|
+
* off-by-one-day bug);
|
|
386
|
+
* - `PREVIOUS_YEAR` — the primary range shifted back 12 months, same length.
|
|
387
|
+
*/
|
|
388
|
+
export declare enum SALES_COMPARISON_BASELINE_ENUM {
|
|
389
|
+
NONE = "NONE",
|
|
390
|
+
PREVIOUS_PERIOD = "PREVIOUS_PERIOD",
|
|
391
|
+
PREVIOUS_YEAR = "PREVIOUS_YEAR"
|
|
392
|
+
}
|
|
393
|
+
export declare const ALL_SALES_COMPARISON_BASELINES: SALES_COMPARISON_BASELINE_ENUM[];
|
|
394
|
+
/**
|
|
395
|
+
* The metric the page charts / headlines (concept §9, `Select Field`).
|
|
396
|
+
*
|
|
397
|
+
* CLIENT-SIDE ONLY: the document already carries every additive counter, so
|
|
398
|
+
* changing this selection must NOT refetch. `AVERAGE_TICKET` is DERIVED
|
|
399
|
+
* (`net_amount / order_count`) and is never stored.
|
|
400
|
+
*/
|
|
401
|
+
export declare enum SALES_COMPARISON_METRIC_ENUM {
|
|
402
|
+
NET_SALES = "NET_SALES",
|
|
403
|
+
GROSS_SALES = "GROSS_SALES",
|
|
404
|
+
DISCOUNTS = "DISCOUNTS",
|
|
405
|
+
ORDER_COUNT = "ORDER_COUNT",
|
|
406
|
+
AVERAGE_TICKET = "AVERAGE_TICKET",
|
|
407
|
+
ITEMS_SOLD = "ITEMS_SOLD"
|
|
408
|
+
}
|
|
409
|
+
export declare const ALL_SALES_COMPARISON_METRICS: SALES_COMPARISON_METRIC_ENUM[];
|
|
410
|
+
/**
|
|
411
|
+
* Hourly Comparison (see console/admin-panel/docs/report-hourly-comparison-concept.md).
|
|
412
|
+
*
|
|
413
|
+
* ONE hourly PROFILE compared against the same profile in a derived baseline range
|
|
414
|
+
* (decision A: one profile pair, not a per-day matrix). The comparison is never stored -
|
|
415
|
+
* `current` and `comparison` are two ordinary reads of HOUR documents, aligned and
|
|
416
|
+
* subtracted in the formatter.
|
|
417
|
+
*
|
|
418
|
+
* Anchor: `order_settled_at` -> the tenant-local settled day AND hour. No time bias.
|
|
419
|
+
*
|
|
420
|
+
* No period documents are written: the profile read only needs hour buckets. The period
|
|
421
|
+
* comparison report already owns the day/period materialization.
|
|
422
|
+
*/
|
|
423
|
+
export declare const MATERIALIZED_TENANT_HOURLY_COMPARISON_REPORTS_COLLECTION_NAME = "materialized_tenant_hourly_comparison_reports";
|
|
424
|
+
export declare const MATERIALIZED_TENANT_HOURLY_COMPARISON_ENTRIES_COLLECTION_NAME = "materialized_tenant_hourly_comparison_entries";
|
|
425
|
+
/** Hour documents only. This is an HOURLY report; no day or period documents. */
|
|
426
|
+
export declare const MATERIALIZED_HOURLY_COMPARISON_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
427
|
+
/** The same key grammar as Sales Comparison: `COMPLETED:POS_DINE-IN`. */
|
|
428
|
+
export declare const HOURLY_COMPARISON_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
429
|
+
export declare const MATERIALIZED_TENANT_HOURLY_COMPARISON_REPORTS_SCHEMA_VERSION = 1;
|
|
430
|
+
export declare const MATERIALIZED_TENANT_HOURLY_COMPARISON_ENTRIES_SCHEMA_VERSION = 1;
|
|
431
|
+
/**
|
|
432
|
+
* Payments Comparison (see console/admin-panel/docs/report-payments-comparison-concept.md).
|
|
433
|
+
*
|
|
434
|
+
* Payment ROWS, not orders: a split order contributes one row per payment, so this
|
|
435
|
+
* report can never be merged with Sales Comparison (which sums orders). The key is
|
|
436
|
+
* `<PAYMENT_METHOD>:<ORDER_STATUS>` (decision B); the method is the normalized,
|
|
437
|
+
* OPEN-string payment type.
|
|
438
|
+
*/
|
|
439
|
+
export declare const MATERIALIZED_TENANT_PAYMENTS_COMPARISON_REPORTS_COLLECTION_NAME = "materialized_tenant_payments_comparison_reports";
|
|
440
|
+
export declare const MATERIALIZED_TENANT_PAYMENTS_COMPARISON_ENTRIES_COLLECTION_NAME = "materialized_tenant_payments_comparison_entries";
|
|
441
|
+
/** The same six comparison grains; no hour / ISO week. */
|
|
442
|
+
export declare const MATERIALIZED_PAYMENTS_COMPARISON_REPORT_SCOPES: MATERIALIZED_REPORT_SCOPE_ENUM[];
|
|
443
|
+
/** Ordered key filters: `<PAYMENT_METHOD>:<ORDER_STATUS>`. */
|
|
444
|
+
export declare const PAYMENTS_COMPARISON_KEY_FILTERS: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
445
|
+
export declare const MATERIALIZED_TENANT_PAYMENTS_COMPARISON_REPORTS_SCHEMA_VERSION = 1;
|
|
446
|
+
export declare const MATERIALIZED_TENANT_PAYMENTS_COMPARISON_ENTRIES_SCHEMA_VERSION = 1;
|
|
447
|
+
/**
|
|
448
|
+
* The metric the Payments Comparison page charts (client-side).
|
|
449
|
+
* `AVERAGE_PAYMENT` is derived (`payment_amount / payment_count`), never stored.
|
|
450
|
+
*/
|
|
451
|
+
export declare enum PAYMENTS_COMPARISON_METRIC_ENUM {
|
|
452
|
+
PAYMENT_AMOUNT = "PAYMENT_AMOUNT",
|
|
453
|
+
PAYMENT_COUNT = "PAYMENT_COUNT",
|
|
454
|
+
AVERAGE_PAYMENT = "AVERAGE_PAYMENT",
|
|
455
|
+
CARD_CHARGES = "CARD_CHARGES",
|
|
456
|
+
REFUNDED_AMOUNT = "REFUNDED_AMOUNT",
|
|
457
|
+
AMOUNT_DUE = "AMOUNT_DUE"
|
|
458
|
+
}
|
|
459
|
+
export declare const ALL_PAYMENTS_COMPARISON_METRICS: PAYMENTS_COMPARISON_METRIC_ENUM[];
|