@managesome/eposmatic-toolkit 0.4.9 → 0.4.11

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