@managesome/eposmatic-toolkit 0.3.11 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/constants/MATERIALIZED_REPORTS.js +105 -0
- package/esm/helpers/materialized-reports/index.js +5 -0
- package/esm/helpers/materialized-reports/key-helpers.js +59 -0
- package/esm/helpers/materialized-reports/materialized-tenant-reports-iterations-helpers.js +60 -0
- package/esm/helpers/materialized-reports/scope-helpers.js +107 -0
- package/esm/helpers/materialized-reports/tenant-sales-overview-close-day-helpers.js +251 -0
- package/esm/helpers/materialized-reports/tenant-sales-overview-helpers.js +860 -0
- package/esm/schemas/models/materialized_tenant_reports_iterations.js +82 -0
- package/esm/schemas/models/materialized_tenant_sales_overview_reports.js +399 -0
- package/esm/schemas/types/materialized_tenant_reports_iterations.js +1 -0
- package/esm/schemas/types/materialized_tenant_sales_overview_reports.js +1 -0
- package/lib/constants/MATERIALIZED_REPORTS.d.ts +96 -0
- package/lib/constants/MATERIALIZED_REPORTS.js +108 -0
- package/lib/helpers/materialized-reports/index.d.ts +5 -0
- package/lib/helpers/materialized-reports/index.js +21 -0
- package/lib/helpers/materialized-reports/key-helpers.d.ts +35 -0
- package/lib/helpers/materialized-reports/key-helpers.js +64 -0
- package/lib/helpers/materialized-reports/materialized-tenant-reports-iterations-helpers.d.ts +66 -0
- package/lib/helpers/materialized-reports/materialized-tenant-reports-iterations-helpers.js +63 -0
- package/lib/helpers/materialized-reports/scope-helpers.d.ts +57 -0
- package/lib/helpers/materialized-reports/scope-helpers.js +114 -0
- package/lib/helpers/materialized-reports/tenant-sales-overview-close-day-helpers.d.ts +125 -0
- package/lib/helpers/materialized-reports/tenant-sales-overview-close-day-helpers.js +256 -0
- package/lib/helpers/materialized-reports/tenant-sales-overview-helpers.d.ts +223 -0
- package/lib/helpers/materialized-reports/tenant-sales-overview-helpers.js +875 -0
- package/lib/schemas/models/materialized_tenant_reports_iterations.d.ts +80 -0
- package/lib/schemas/models/materialized_tenant_reports_iterations.js +85 -0
- package/lib/schemas/models/materialized_tenant_sales_overview_reports.d.ts +569 -0
- package/lib/schemas/models/materialized_tenant_sales_overview_reports.js +402 -0
- package/lib/schemas/types/materialized_tenant_reports_iterations.d.ts +62 -0
- package/lib/schemas/types/materialized_tenant_reports_iterations.js +2 -0
- package/lib/schemas/types/materialized_tenant_sales_overview_reports.d.ts +242 -0
- package/lib/schemas/types/materialized_tenant_sales_overview_reports.js +3 -0
- package/lib/tests/materialized-reports/fixtures.d.ts +81 -0
- package/lib/tests/materialized-reports/fixtures.js +87 -0
- package/lib/tests/materialized-reports/fixtures.test.d.ts +1 -0
- package/lib/tests/materialized-reports/fixtures.test.js +123 -0
- package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-helpers.test.js +75 -0
- package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-schema.test.js +73 -0
- package/lib/tests/materialized-reports/materialized-tenant-sales-overview-reports-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-sales-overview-reports-schema.test.js +207 -0
- package/lib/tests/materialized-reports/sales-overview-baseline.test.d.ts +1 -0
- package/lib/tests/materialized-reports/sales-overview-baseline.test.js +326 -0
- package/lib/tests/materialized-reports/sales-overview-reference.d.ts +63 -0
- package/lib/tests/materialized-reports/sales-overview-reference.js +131 -0
- package/lib/tests/materialized-reports/tenant-sales-overview-close-day-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/tenant-sales-overview-close-day-helpers.test.js +335 -0
- package/lib/tests/materialized-reports/tenant-sales-overview-helpers.test.d.ts +1 -0
- package/lib/tests/materialized-reports/tenant-sales-overview-helpers.test.js +885 -0
- package/package.json +5 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { REPORT_SALE_TYPE_ENUM } from '../../constants';
|
|
2
|
+
import { DAY_INDEX_ENUM } from '../../constants/ENUMS';
|
|
3
|
+
import { MATERIALIZED_REPORT_KEY_FILTER_ENUM, MATERIALIZED_REPORT_SCOPE_ENUM } from '../../constants/MATERIALIZED_REPORTS';
|
|
4
|
+
/**
|
|
5
|
+
* Document types for `materialized_tenant_sales_overview_reports` — the
|
|
6
|
+
* materialized version of the admin panel Reports > Overview report.
|
|
7
|
+
*
|
|
8
|
+
* See `MATERIALIZED_REPORTS.md` for the full conventions:
|
|
9
|
+
* - one document per (tenant, scope context, scope value) — `scope_context` +
|
|
10
|
+
* `scope_field`; stamped from the order's business day (`order.localDate`;
|
|
11
|
+
* hours: punch hour for sales, settlement hour for credit-bill collections),
|
|
12
|
+
* the time-bias toggle / Punched At is out of scope for this collection;
|
|
13
|
+
* - `sale_type_key_filters` declares the ordered filter dimensions encoded
|
|
14
|
+
* into every `sale_type_metrics` key (e.g. `"PLACED:POS_WALK-IN"`);
|
|
15
|
+
* - amounts are CENTS (same as the live API response);
|
|
16
|
+
* - order metrics carry the money breakdown (discounts by source, gst/tax,
|
|
17
|
+
* tip, delivery charges, provider charges) so Overview/Summary views render
|
|
18
|
+
* without re-reading orders;
|
|
19
|
+
* - `payment_type` is an open string — live stores contain values outside
|
|
20
|
+
* `PAYMENT_TYPE_ENUM` (`CARD_PAYMENT`, `FOODPANDA`, …) and they must pass
|
|
21
|
+
* through untouched;
|
|
22
|
+
* - the `CREDIT_BILLS` slot of each `sale_type_metrics` key carries the
|
|
23
|
+
* PAY_LATER ledger (issued + settled tracking / received) so platform and
|
|
24
|
+
* status filters apply to credit bills too; report views (the Credit Bills
|
|
25
|
+
* sale-type numbers and the credit-settlement payments line) are derived by
|
|
26
|
+
* the frontend formatter (see `MATERIALIZED_REPORTS.md`);
|
|
27
|
+
* - every structural write's full post-write snapshot is recorded in the
|
|
28
|
+
* shared `materialized_tenant_reports_iterations` history — this document carries no
|
|
29
|
+
* embedded iteration snapshot.
|
|
30
|
+
*/
|
|
31
|
+
/** Order-level discount sums per source (`order_discount_details`), cents. */
|
|
32
|
+
export interface IMaterializedReportDiscountByType {
|
|
33
|
+
special_discount: number;
|
|
34
|
+
loyalty_discount: number;
|
|
35
|
+
voucher_discount: number;
|
|
36
|
+
}
|
|
37
|
+
/** Order totals of one sale-type block (cents). */
|
|
38
|
+
export interface IMaterializedReportOrderMetric {
|
|
39
|
+
count: number;
|
|
40
|
+
/**
|
|
41
|
+
* Sum of `amount_earned` in cents. Mirrors the live `TOTAL_SALES` /
|
|
42
|
+
* `CANCELLED_ORDERS` facets.
|
|
43
|
+
*/
|
|
44
|
+
gross_amount: number;
|
|
45
|
+
/**
|
|
46
|
+
* Sum of `total_discount_applied` (cents) — order-level discounts; the
|
|
47
|
+
* per-source split lives in `discount_by_type`.
|
|
48
|
+
*/
|
|
49
|
+
discount_amount: number;
|
|
50
|
+
discount_by_type: IMaterializedReportDiscountByType;
|
|
51
|
+
/** Sum of `gst_amount` (cents) — GST collected on the bucket's orders. */
|
|
52
|
+
gst_amount: number;
|
|
53
|
+
/** Sum of `tax_amount` (cents) — other tax (0 on today's live data). */
|
|
54
|
+
tax_amount: number;
|
|
55
|
+
/** Sum of `tip_amount` (cents). */
|
|
56
|
+
tip_amount: number;
|
|
57
|
+
/** Sum of `tax_invoice_provider_charges` (cents). */
|
|
58
|
+
tax_invoice_provider_charges: number;
|
|
59
|
+
/** Sum of `delivery_details.delivery_cost` (cents). */
|
|
60
|
+
delivery_charges: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Payment totals of one sale-type block, grouped by `payment_type` — mirrors
|
|
64
|
+
* the live `TOTAL_PAYMENT_SALES` facet (which unwinds `order.payments` and
|
|
65
|
+
* applies the payment inclusion + gross rules documented in
|
|
66
|
+
* `MATERIALIZED_REPORTS.md` and `sales-overview-reference.ts`).
|
|
67
|
+
*/
|
|
68
|
+
export interface IMaterializedReportPaymentMetric {
|
|
69
|
+
/**
|
|
70
|
+
* Open string — NOT validated against `PAYMENT_TYPE_ENUM`. Stores raw
|
|
71
|
+
* values (`CARD_PAYMENT`, `FOODPANDA`, `GOLOOTLO`, …), plus the synthetic
|
|
72
|
+
* `'CREDIT_SETTLEMENT'` line that carries credit-bill collections on the
|
|
73
|
+
* day they are received. The `PAY_LATER` → `UNPAID` remap happens at read
|
|
74
|
+
* time.
|
|
75
|
+
*/
|
|
76
|
+
payment_type: string;
|
|
77
|
+
/** Number of payments (not orders) of this type. */
|
|
78
|
+
count: number;
|
|
79
|
+
/**
|
|
80
|
+
* Cents, net of refunds and card charges; may be negative for refunded
|
|
81
|
+
* payments (`-amount_refunded`).
|
|
82
|
+
*/
|
|
83
|
+
gross_amount: number;
|
|
84
|
+
amount_due: number;
|
|
85
|
+
amount_paid: number;
|
|
86
|
+
amount_refunded: number;
|
|
87
|
+
/** Sum of `payments.card_details.card_charges` (0 when no card details). */
|
|
88
|
+
card_charges: number;
|
|
89
|
+
}
|
|
90
|
+
/** The three sale-type metric variants of one filter-combination bucket. */
|
|
91
|
+
export interface IMaterializedReportSaleTypeMetric {
|
|
92
|
+
orders: IMaterializedReportOrderMetric;
|
|
93
|
+
payments: IMaterializedReportPaymentMetric[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* One credit bill (`PAY_LATER`) tracked by a `sale_type_metrics` key. Issued
|
|
97
|
+
* when a day closes with an unpaid order marked as a credit bill;
|
|
98
|
+
* `received_amount` / `settled_at` are patched when the bill is collected on
|
|
99
|
+
* a later day.
|
|
100
|
+
*/
|
|
101
|
+
export interface IMaterializedReportCreditBill {
|
|
102
|
+
order_id: string;
|
|
103
|
+
payment_id: string;
|
|
104
|
+
/** Cents — the bill's amount at issue. */
|
|
105
|
+
amount: number;
|
|
106
|
+
/**
|
|
107
|
+
* Cumulative amount received against the bill so far (0 while unpaid, less
|
|
108
|
+
* than `amount` while partially paid). Replaces the old `is_settled` flag:
|
|
109
|
+
* the bill is SETTLED when `received_amount >= amount` (`settled_at` is
|
|
110
|
+
* stamped). Never an event delta — collection patches write absolute
|
|
111
|
+
* values, so replays are idempotent.
|
|
112
|
+
*/
|
|
113
|
+
received_amount: number;
|
|
114
|
+
credit_note?: string;
|
|
115
|
+
/**
|
|
116
|
+
* When the bill was issued — the order's punch time (`createdAt`), never
|
|
117
|
+
* `order_settled_at` (for deferred bills that is the collection moment).
|
|
118
|
+
*/
|
|
119
|
+
issued_at: Date;
|
|
120
|
+
settled_at: Date | null;
|
|
121
|
+
}
|
|
122
|
+
/** A previously-issued credit bill collected within this scope's slice. */
|
|
123
|
+
export interface IMaterializedReportReceivedCreditBill {
|
|
124
|
+
order_id: string;
|
|
125
|
+
payment_id: string;
|
|
126
|
+
/** Cents — the collected amount. */
|
|
127
|
+
amount: number;
|
|
128
|
+
/** Cumulative amount received as of the collection compile (reaches `amount` when fully collected). */
|
|
129
|
+
received_amount: number;
|
|
130
|
+
credit_note?: string;
|
|
131
|
+
/** `YYYY-MM-DD` local day the bill was issued on (the sale's day). */
|
|
132
|
+
issued_local_date: string;
|
|
133
|
+
/**
|
|
134
|
+
* Collection timestamp (`order_settled_at`) when known — stamped onto the
|
|
135
|
+
* issue-day bill's `settled_at` by the collection patch (falls back to the
|
|
136
|
+
* close's `computedAt`).
|
|
137
|
+
*/
|
|
138
|
+
settled_at?: Date | null;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Credit-bill (`PAY_LATER`) ledger of one `sale_type_metrics` key (see
|
|
142
|
+
* `MATERIALIZED_REPORTS.md`):
|
|
143
|
+
* - `issued` — bills created for this filter combination (tracking; NOT
|
|
144
|
+
* money-in), including `settled_count` / `settled_amount` — how much of
|
|
145
|
+
* them has been collected since (patched on settlement; analysis only);
|
|
146
|
+
* - `received` — previous days' bills of this combination collected in this
|
|
147
|
+
* scope (tracking; the frontend formatter derives the credit-settlement
|
|
148
|
+
* payments line from it).
|
|
149
|
+
*
|
|
150
|
+
* Amounts are cents. The ledger never feeds gross — gross stays sales-only so
|
|
151
|
+
* cross-day gross sums stay equal to total sales.
|
|
152
|
+
*/
|
|
153
|
+
export interface IMaterializedReportCreditBills {
|
|
154
|
+
issued: {
|
|
155
|
+
count: number;
|
|
156
|
+
amount: number;
|
|
157
|
+
/**
|
|
158
|
+
* Of the issued bills: how many / how much (cents) have been collected
|
|
159
|
+
* since — patched when the collection event is detected.
|
|
160
|
+
*/
|
|
161
|
+
settled_count: number;
|
|
162
|
+
settled_amount: number;
|
|
163
|
+
bills: IMaterializedReportCreditBill[];
|
|
164
|
+
};
|
|
165
|
+
received: {
|
|
166
|
+
count: number;
|
|
167
|
+
amount: number;
|
|
168
|
+
bills: IMaterializedReportReceivedCreditBill[];
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Metrics for one `sale_type_metrics` key — the entry exists only for filter
|
|
173
|
+
* combinations observed that day; absent key = zero.
|
|
174
|
+
*/
|
|
175
|
+
export interface IMaterializedReportKeyMetrics {
|
|
176
|
+
/** Non-cancelled orders (live `TOTAL_SALES` sale type: no constraint). */
|
|
177
|
+
[REPORT_SALE_TYPE_ENUM.TOTAL_SALES]: IMaterializedReportSaleTypeMetric;
|
|
178
|
+
/** Orders with `amount_collected > 0`. */
|
|
179
|
+
[REPORT_SALE_TYPE_ENUM.AMOUNT_COLLECTED]: IMaterializedReportSaleTypeMetric;
|
|
180
|
+
/**
|
|
181
|
+
* Credit-bill (`PAY_LATER`) ledger of this filter combination — the Credit
|
|
182
|
+
* Bills sale-type numbers are derived from it by the frontend formatter
|
|
183
|
+
* (not stored separately).
|
|
184
|
+
*/
|
|
185
|
+
[REPORT_SALE_TYPE_ENUM.CREDIT_BILLS]: IMaterializedReportCreditBills;
|
|
186
|
+
}
|
|
187
|
+
export interface IMaterializedTenantSalesOverviewReport {
|
|
188
|
+
_id: string;
|
|
189
|
+
tenant_id: string;
|
|
190
|
+
/** Required for brand-level reads (sum across the brand's tenants). */
|
|
191
|
+
brand_id: string;
|
|
192
|
+
/**
|
|
193
|
+
* Which time-scope this document covers (`localHour` … `localYear`).
|
|
194
|
+
* One document per (tenant, scope context, scope value).
|
|
195
|
+
*/
|
|
196
|
+
scope_context: MATERIALIZED_REPORT_SCOPE_ENUM;
|
|
197
|
+
/**
|
|
198
|
+
* The scope value this document summarizes — the field the standardized
|
|
199
|
+
* query filters on. Format depends on `scope_context` (e.g. `'2026-09-15'`
|
|
200
|
+
* for `LOCAL_DATE`, `'2026-09-15 18'` for `LOCAL_HOUR`); see
|
|
201
|
+
* `MATERIALIZED_REPORT_SCOPE_ENUM` / `MATERIALIZED_REPORTS.md`.
|
|
202
|
+
*/
|
|
203
|
+
scope_field: string;
|
|
204
|
+
/**
|
|
205
|
+
* Denormalized weekday of `scope_field` — set ONLY on `LOCAL_HOUR` /
|
|
206
|
+
* `LOCAL_DATE` documents (`null` elsewhere; see
|
|
207
|
+
* `MATERIALIZED_REPORT_SCOPES_WITH_DAY_INDEX`). Enables filter-correct
|
|
208
|
+
* weekday queries (`day_index` + `scope_field` range) and weekday grouping
|
|
209
|
+
* without an all-time accumulator document; derived from the scope value by
|
|
210
|
+
* the materializer (`DAY_INDEX_ENUM`).
|
|
211
|
+
*/
|
|
212
|
+
day_index?: DAY_INDEX_ENUM | null;
|
|
213
|
+
/**
|
|
214
|
+
* Ordered filter dimensions encoded into `sale_type_metrics` keys; the
|
|
215
|
+
* order defines the key grammar (`"PLACED:POS_WALK-IN"`).
|
|
216
|
+
*/
|
|
217
|
+
sale_type_key_filters: MATERIALIZED_REPORT_KEY_FILTER_ENUM[];
|
|
218
|
+
/**
|
|
219
|
+
* One entry per observed filter-combination key. An empty map represents a
|
|
220
|
+
* day with no orders (kept so reconcile/watermark comparisons stay uniform).
|
|
221
|
+
*/
|
|
222
|
+
sale_type_metrics: Record<string, IMaterializedReportKeyMetrics> | null;
|
|
223
|
+
/**
|
|
224
|
+
* Versioned writes applied to this document (replacement / deltas; 1 = first
|
|
225
|
+
* materialization). Received-payment patches that change the ledger bump it
|
|
226
|
+
* too (no-op patches don't). Every bump is recorded as a row in the shared
|
|
227
|
+
* `materialized_tenant_reports_iterations` history (full post-write snapshot;
|
|
228
|
+
* see `MATERIALIZED_REPORTS.md`).
|
|
229
|
+
*/
|
|
230
|
+
iteration?: number;
|
|
231
|
+
/** Bump on key-grammar / metric-rule changes; requires re-materialization. */
|
|
232
|
+
schema_version: number;
|
|
233
|
+
/**
|
|
234
|
+
* Max source `orders.updatedAt` folded into this document — staleness
|
|
235
|
+
* detection and watermark-guarded upserts.
|
|
236
|
+
*/
|
|
237
|
+
source_watermark: Date;
|
|
238
|
+
/** When the materializer last rebuilt this document. */
|
|
239
|
+
computed_at: Date;
|
|
240
|
+
createdAt: Date;
|
|
241
|
+
updatedAt: Date;
|
|
242
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loader for the live-store order fixtures used by materialized-report tests.
|
|
3
|
+
*
|
|
4
|
+
* Two datasets are checked into `src/tests/` (one month of live orders each):
|
|
5
|
+
* - `basha-orders.json` — tenant `basha-istanbul-f7`, 2026-09-01 → 2026-09-30
|
|
6
|
+
* - `bruzo-orders.json` — tenant `z2-isb`, 2026-09-01 → 2026-09-30
|
|
7
|
+
*
|
|
8
|
+
* Both files are full order documents (Mongo export shape): dates are ISO
|
|
9
|
+
* strings, `_id`s are hex strings, and `payment_type`/`payment_status` are
|
|
10
|
+
* OPEN strings — live stores contain values that are not in the current
|
|
11
|
+
* toolkit enums (e.g. `CARD_PAYMENT`, `FOODPANDA`, `ONLINE`, `PLAZA`,
|
|
12
|
+
* `GOLOOTLO`, `MARKETING`). Materialization logic must pass unknown payment
|
|
13
|
+
* types through, never enum-validate them.
|
|
14
|
+
*
|
|
15
|
+
* The loader normalizes date strings to `Date` objects for computation and
|
|
16
|
+
* caches parsed datasets per process (the JSON files are 10–18 MB).
|
|
17
|
+
*/
|
|
18
|
+
export type OrdersDatasetName = 'basha' | 'bruzo';
|
|
19
|
+
export interface OrdersDatasetInfo {
|
|
20
|
+
/** Fixture file base name, `src/tests/<fileName>`. */
|
|
21
|
+
fileName: string;
|
|
22
|
+
/** Tenant the dataset belongs to (from `orders[].tenant_id`). */
|
|
23
|
+
tenantId: string;
|
|
24
|
+
/** UTC range covered by `createdAt` values (inclusive). */
|
|
25
|
+
createdFrom: string;
|
|
26
|
+
createdTo: string;
|
|
27
|
+
/** Expected number of orders — asserted by dataset sanity tests. */
|
|
28
|
+
orderCount: number;
|
|
29
|
+
/** Tenant GMT offset the enriched local fields are computed with (both stores: +5). */
|
|
30
|
+
gmtOffset: number;
|
|
31
|
+
/** Business-day boundary — 6am–6am days (punches before 06:00 local belong to the previous day). */
|
|
32
|
+
businessDayStartHour: number;
|
|
33
|
+
/** Human-readable note about what this dataset is good for. */
|
|
34
|
+
note: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const ORDERS_DATASETS: Record<OrdersDatasetName, OrdersDatasetInfo>;
|
|
37
|
+
export declare const ALL_ORDERS_DATASET_NAMES: OrdersDatasetName[];
|
|
38
|
+
/** Payment as stored in the fixture JSON (open `payment_type`/`payment_status`). */
|
|
39
|
+
export interface FixturePayment {
|
|
40
|
+
_id?: string;
|
|
41
|
+
payment_type: string;
|
|
42
|
+
payment_status: string;
|
|
43
|
+
amount_due: number;
|
|
44
|
+
amount_paid: number;
|
|
45
|
+
amount_refunded: number;
|
|
46
|
+
card_details?: {
|
|
47
|
+
card_charges?: number;
|
|
48
|
+
} | null;
|
|
49
|
+
}
|
|
50
|
+
/** Order as stored in the fixture JSON (dates are ISO strings). */
|
|
51
|
+
export interface RawFixtureOrder {
|
|
52
|
+
_id: string;
|
|
53
|
+
tenant_id: string;
|
|
54
|
+
platform: string;
|
|
55
|
+
order_status: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
order_settled_at: string | null;
|
|
58
|
+
order_settled_at_mins?: number;
|
|
59
|
+
amount_collected: number;
|
|
60
|
+
amount_earned: number;
|
|
61
|
+
deferred_settlement?: boolean;
|
|
62
|
+
is_deleted?: boolean;
|
|
63
|
+
payments?: FixturePayment[];
|
|
64
|
+
/** Enriched ILocalTimeFields (`scripts/enrich-order-fixtures.ts`). */
|
|
65
|
+
localDate?: string;
|
|
66
|
+
localHour?: number;
|
|
67
|
+
day_index?: string;
|
|
68
|
+
}
|
|
69
|
+
/** Fixture order normalized for computation (dates parsed, payments always an array). */
|
|
70
|
+
export interface FixtureOrder extends Omit<RawFixtureOrder, 'createdAt' | 'order_settled_at' | 'payments'> {
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
order_settled_at: Date | null;
|
|
73
|
+
payments: FixturePayment[];
|
|
74
|
+
}
|
|
75
|
+
/** Load a dataset with dates normalized to `Date` objects (cached per process). */
|
|
76
|
+
export declare function loadOrdersDataset(name: OrdersDatasetName): FixtureOrder[];
|
|
77
|
+
/**
|
|
78
|
+
* Load the dataset WITHOUT date normalization — useful when asserting the raw
|
|
79
|
+
* JSON shape (sanity tests) or when a future test wants to re-serialize.
|
|
80
|
+
*/
|
|
81
|
+
export declare function loadRawOrdersDatasetForTest(name: OrdersDatasetName): RawFixtureOrder[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ALL_ORDERS_DATASET_NAMES = exports.ORDERS_DATASETS = void 0;
|
|
7
|
+
exports.loadOrdersDataset = loadOrdersDataset;
|
|
8
|
+
exports.loadRawOrdersDatasetForTest = loadRawOrdersDatasetForTest;
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
exports.ORDERS_DATASETS = {
|
|
12
|
+
basha: {
|
|
13
|
+
fileName: 'basha-orders.json',
|
|
14
|
+
tenantId: 'basha-istanbul-f7',
|
|
15
|
+
createdFrom: '2026-09-01T07:37:13.237Z',
|
|
16
|
+
createdTo: '2026-09-30T10:48:19.538Z',
|
|
17
|
+
orderCount: 2931,
|
|
18
|
+
gmtOffset: 5,
|
|
19
|
+
businessDayStartHour: 6,
|
|
20
|
+
note: 'Single-platform-dominant store (APP_DINE-IN); card-payment heavy with legacy CARD_PAYMENT ids; UNPAID + COMPLIMENTARY payments. Enriched (scripts/enrich-order-fixtures.ts): ILocalTimeFields on a 6am–6am GMT+5 business day, all 8 order statuses, 8 issued credit bills (`PAY_LATER`/PENDING) and 6 settled-later credit bills (fully paid, `order_settled_at` on a later day).',
|
|
21
|
+
},
|
|
22
|
+
bruzo: {
|
|
23
|
+
fileName: 'bruzo-orders.json',
|
|
24
|
+
tenantId: 'z2-isb',
|
|
25
|
+
createdFrom: '2026-09-01T04:36:43.631Z',
|
|
26
|
+
createdTo: '2026-09-30T10:45:30.592Z',
|
|
27
|
+
orderCount: 2166,
|
|
28
|
+
gmtOffset: 5,
|
|
29
|
+
businessDayStartHour: 6,
|
|
30
|
+
note: 'Multi-platform store (FOODPANDA/POS/APP/WEB); 96 cancelled orders; aggregator + legacy payment types (FOODPANDA, PLAZA, GOLOOTLO, MARKETING, ONLINE, CARD_PAYMENT). Enriched (scripts/enrich-order-fixtures.ts): ILocalTimeFields on a 6am–6am GMT+5 business day, all 8 order statuses, 8 issued credit bills + 6 settled-later credit bills, and 11 orders settling on a later UTC day (5 original + 6 settled-later).',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
exports.ALL_ORDERS_DATASET_NAMES = ['basha', 'bruzo'];
|
|
34
|
+
const cache = new Map();
|
|
35
|
+
const rawCache = new Map();
|
|
36
|
+
/**
|
|
37
|
+
* Resolve a fixture file from either the source tree (`src/tests/...`) or a
|
|
38
|
+
* compiled tree (`lib/tests/materialized-reports/...` — the repo compiles
|
|
39
|
+
* tests, and JSON files are not copied to `lib`, so fall back to the source
|
|
40
|
+
* file relative to the repo root).
|
|
41
|
+
*/
|
|
42
|
+
function resolveDataFile(fileName) {
|
|
43
|
+
const candidates = [
|
|
44
|
+
path_1.default.join(__dirname, '..', fileName),
|
|
45
|
+
path_1.default.join(__dirname, '..', '..', '..', 'src', 'tests', fileName),
|
|
46
|
+
path_1.default.join(process.cwd(), 'src', 'tests', fileName),
|
|
47
|
+
];
|
|
48
|
+
for (const candidate of candidates) {
|
|
49
|
+
if (fs_1.default.existsSync(candidate))
|
|
50
|
+
return candidate;
|
|
51
|
+
}
|
|
52
|
+
throw new Error(`Fixture file "${fileName}" not found. Looked in:\n${candidates.join('\n')}`);
|
|
53
|
+
}
|
|
54
|
+
function loadRawOrdersDataset(name) {
|
|
55
|
+
const cached = rawCache.get(name);
|
|
56
|
+
if (cached)
|
|
57
|
+
return cached;
|
|
58
|
+
const info = exports.ORDERS_DATASETS[name];
|
|
59
|
+
const filePath = resolveDataFile(info.fileName);
|
|
60
|
+
const parsed = JSON.parse(fs_1.default.readFileSync(filePath, 'utf8'));
|
|
61
|
+
if (!Array.isArray(parsed)) {
|
|
62
|
+
throw new Error(`Fixture "${info.fileName}" must contain an array of orders`);
|
|
63
|
+
}
|
|
64
|
+
rawCache.set(name, parsed);
|
|
65
|
+
return parsed;
|
|
66
|
+
}
|
|
67
|
+
/** Load a dataset with dates normalized to `Date` objects (cached per process). */
|
|
68
|
+
function loadOrdersDataset(name) {
|
|
69
|
+
const cached = cache.get(name);
|
|
70
|
+
if (cached)
|
|
71
|
+
return cached;
|
|
72
|
+
const orders = loadRawOrdersDataset(name).map((order) => ({
|
|
73
|
+
...order,
|
|
74
|
+
createdAt: new Date(order.createdAt),
|
|
75
|
+
order_settled_at: order.order_settled_at != null ? new Date(order.order_settled_at) : null,
|
|
76
|
+
payments: order.payments ?? [],
|
|
77
|
+
}));
|
|
78
|
+
cache.set(name, orders);
|
|
79
|
+
return orders;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Load the dataset WITHOUT date normalization — useful when asserting the raw
|
|
83
|
+
* JSON shape (sanity tests) or when a future test wants to re-serialize.
|
|
84
|
+
*/
|
|
85
|
+
function loadRawOrdersDatasetForTest(name) {
|
|
86
|
+
return loadRawOrdersDataset(name);
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const constants_1 = require("../../constants");
|
|
4
|
+
const fixtures_1 = require("./fixtures");
|
|
5
|
+
/**
|
|
6
|
+
* Sanity + coverage tests for the live-store order fixtures themselves.
|
|
7
|
+
* If these fail after a fixture change, review `ORDERS_DATASETS` metadata and
|
|
8
|
+
* every pinned baseline in `sales-overview-baseline.test.ts`.
|
|
9
|
+
*/
|
|
10
|
+
describe('order fixtures', () => {
|
|
11
|
+
it('loads both datasets with the expected order counts', () => {
|
|
12
|
+
for (const name of fixtures_1.ALL_ORDERS_DATASET_NAMES) {
|
|
13
|
+
const orders = (0, fixtures_1.loadOrdersDataset)(name);
|
|
14
|
+
expect(orders).toHaveLength(fixtures_1.ORDERS_DATASETS[name].orderCount);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
it('normalizes dates to Date objects and keeps payments as arrays', () => {
|
|
18
|
+
for (const name of fixtures_1.ALL_ORDERS_DATASET_NAMES) {
|
|
19
|
+
const { tenantId, createdFrom, createdTo } = fixtures_1.ORDERS_DATASETS[name];
|
|
20
|
+
const orders = (0, fixtures_1.loadOrdersDataset)(name);
|
|
21
|
+
for (const order of orders) {
|
|
22
|
+
expect(order.tenant_id).toBe(tenantId);
|
|
23
|
+
expect(order.createdAt).toBeInstanceOf(Date);
|
|
24
|
+
expect(order.is_deleted).toBe(false);
|
|
25
|
+
expect(Array.isArray(order.payments)).toBe(true);
|
|
26
|
+
// Every fixture order is settled (materialization day-bucketing relies on it).
|
|
27
|
+
expect(order.order_settled_at).toBeInstanceOf(Date);
|
|
28
|
+
}
|
|
29
|
+
const createdTimes = orders.map((o) => o.createdAt.getTime());
|
|
30
|
+
expect(new Date(Math.min(...createdTimes)).toISOString()).toBe(createdFrom);
|
|
31
|
+
expect(new Date(Math.max(...createdTimes)).toISOString()).toBe(createdTo);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
it('keeps raw ISO dates available through the raw loader', () => {
|
|
35
|
+
const raw = (0, fixtures_1.loadRawOrdersDatasetForTest)('basha');
|
|
36
|
+
expect(typeof raw[0].createdAt).toBe('string');
|
|
37
|
+
expect(raw[0].createdAt).toMatch(/^\d{4}-\d{2}-\d{2}T/);
|
|
38
|
+
});
|
|
39
|
+
it('covers the report dimensions the baselines rely on', () => {
|
|
40
|
+
const basha = (0, fixtures_1.loadOrdersDataset)('basha');
|
|
41
|
+
const bruzo = (0, fixtures_1.loadOrdersDataset)('bruzo');
|
|
42
|
+
const platforms = (orders) => new Set(orders.map((o) => o.platform));
|
|
43
|
+
const statuses = (orders) => new Set(orders.map((o) => o.order_status));
|
|
44
|
+
const paymentTypes = (orders) => new Set(orders.flatMap((o) => o.payments.map((p) => p.payment_type)));
|
|
45
|
+
// Every ORDER_STATUS value exists in each dataset (status-filter coverage).
|
|
46
|
+
for (const name of fixtures_1.ALL_ORDERS_DATASET_NAMES) {
|
|
47
|
+
expect(statuses((0, fixtures_1.loadOrdersDataset)(name))).toEqual(new Set(constants_1.ALL_ORDER_STATUS_NAMES));
|
|
48
|
+
}
|
|
49
|
+
// Cancelled orders exist in both stores (required by the CANCELLED facet).
|
|
50
|
+
expect(basha.filter((o) => o.order_status === 'CANCELLED')).toHaveLength(15);
|
|
51
|
+
expect(bruzo.filter((o) => o.order_status === 'CANCELLED')).toHaveLength(96);
|
|
52
|
+
// Platform spread: one dominant platform vs a true multi-platform store,
|
|
53
|
+
// plus the representative "main platform" set across both datasets.
|
|
54
|
+
expect(platforms(basha)).toContain('APP_DINE-IN');
|
|
55
|
+
expect(platforms(bruzo)).toContain('FOODPANDA_TAKE-AWAY');
|
|
56
|
+
const mainPlatforms = [
|
|
57
|
+
'APP_DINE-IN',
|
|
58
|
+
'APP_DELIVERY',
|
|
59
|
+
'APP_TAKE-AWAY',
|
|
60
|
+
'POS_WALK-IN',
|
|
61
|
+
'POS_TAKE-AWAY',
|
|
62
|
+
'POS_DINE-IN',
|
|
63
|
+
'POS_DELIVERY',
|
|
64
|
+
'POS_DRIVE-THRU',
|
|
65
|
+
'POS_KIOSK',
|
|
66
|
+
'WEB_TAKE-AWAY',
|
|
67
|
+
'WEB_DELIVERY',
|
|
68
|
+
'WEB_DINE-IN',
|
|
69
|
+
'FOODPANDA_TAKE-AWAY',
|
|
70
|
+
'FOODPANDA_DELIVERY',
|
|
71
|
+
'TALABAT_DELIVERY',
|
|
72
|
+
'UBER-EATS_DELIVERY',
|
|
73
|
+
];
|
|
74
|
+
const allPlatforms = new Set([...platforms(basha), ...platforms(bruzo)]);
|
|
75
|
+
for (const platform of mainPlatforms)
|
|
76
|
+
expect(allPlatforms).toContain(platform);
|
|
77
|
+
// Live stores contain payment types that are NOT in PAYMENT_TYPE_ENUM —
|
|
78
|
+
// these must pass through reporting untouched.
|
|
79
|
+
expect(paymentTypes(basha)).toContain('CARD_PAYMENT');
|
|
80
|
+
for (const legacy of ['CARD_PAYMENT', 'FOODPANDA', 'ONLINE', 'PLAZA', 'GOLOOTLO', 'MARKETING']) {
|
|
81
|
+
expect(paymentTypes(bruzo)).toContain(legacy);
|
|
82
|
+
}
|
|
83
|
+
// Credit bills per store: 8 issued (`PAY_LATER`/PENDING + deferred tag)
|
|
84
|
+
// and 6 settled later (fully paid, `order_settled_at` on a later day).
|
|
85
|
+
for (const orders of [basha, bruzo]) {
|
|
86
|
+
expect(orders.filter((o) => o.deferred_settlement === true)).toHaveLength(8);
|
|
87
|
+
const settledLater = orders.filter((o) => o.order_settled_at != null &&
|
|
88
|
+
o.localDate != null &&
|
|
89
|
+
o.order_settled_at.toISOString().slice(0, 10) > o.localDate &&
|
|
90
|
+
o.payments.some((p) => p.payment_type === 'PAY_LATER' && p.payment_status === 'SETTLED'));
|
|
91
|
+
expect(settledLater).toHaveLength(6);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
it('assigns ILocalTimeFields on a 6am–6am (+5) business day', () => {
|
|
95
|
+
for (const name of fixtures_1.ALL_ORDERS_DATASET_NAMES) {
|
|
96
|
+
const { gmtOffset, businessDayStartHour } = fixtures_1.ORDERS_DATASETS[name];
|
|
97
|
+
for (const order of (0, fixtures_1.loadOrdersDataset)(name)) {
|
|
98
|
+
expect(order.localDate).toMatch(/^\d{4}-\d{2}-\d{2}$/);
|
|
99
|
+
expect(typeof order.localHour).toBe('number');
|
|
100
|
+
expect(order.day_index).toBeDefined();
|
|
101
|
+
// 6am–6am rule: at/after 06:00 local → the local calendar day, before
|
|
102
|
+
// 06:00 → the previous day.
|
|
103
|
+
const shifted = new Date(order.createdAt.getTime() + gmtOffset * 60 * 60 * 1000);
|
|
104
|
+
const calendarDay = shifted.toISOString().slice(0, 10);
|
|
105
|
+
const previousDay = new Date(shifted.getTime() - 24 * 60 * 60 * 1000).toISOString().slice(0, 10);
|
|
106
|
+
const expectedDay = shifted.getUTCHours() < businessDayStartHour ? previousDay : calendarDay;
|
|
107
|
+
expect(order.localDate).toBe(expectedDay);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
it('covers cross-day settlement for time-bias tests (incl. settled-later credit bills)', () => {
|
|
112
|
+
const utcDay = (date) => date.toISOString().slice(0, 10);
|
|
113
|
+
const crossMidnight = (name) => (0, fixtures_1.loadOrdersDataset)(name).filter((o) => o.order_settled_at != null && utcDay(o.order_settled_at) !== utcDay(o.createdAt));
|
|
114
|
+
// basha: the 6 settled-later credit bills settle on the UTC day after.
|
|
115
|
+
expect(crossMidnight('basha')).toHaveLength(6);
|
|
116
|
+
// bruzo: 5 original cross-midnight settlements + 6 settled-later credit bills.
|
|
117
|
+
expect(crossMidnight('bruzo')).toHaveLength(11);
|
|
118
|
+
});
|
|
119
|
+
it('caches parsed datasets per process', () => {
|
|
120
|
+
expect((0, fixtures_1.loadOrdersDataset)('basha')).toBe((0, fixtures_1.loadOrdersDataset)('basha'));
|
|
121
|
+
expect((0, fixtures_1.loadOrdersDataset)('bruzo')).toBe((0, fixtures_1.loadOrdersDataset)('bruzo'));
|
|
122
|
+
});
|
|
123
|
+
});
|
package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-helpers.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const ENUMS_1 = require("../../constants/ENUMS");
|
|
8
|
+
const MATERIALIZED_REPORTS_1 = require("../../constants/MATERIALIZED_REPORTS");
|
|
9
|
+
const materialized_tenant_reports_iterations_helpers_1 = require("../../helpers/materialized-reports/materialized-tenant-reports-iterations-helpers");
|
|
10
|
+
/** Narrows helper results that are `null` on invalid data (tests expect valid data). */
|
|
11
|
+
const expectNonNull = (value) => {
|
|
12
|
+
if (value == null)
|
|
13
|
+
throw new Error('expected a non-null helper result');
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
const materializedReport = (overrides = {}) => ({
|
|
17
|
+
_id: '68dd3f9c9f1b2c3d4e5f6a7b',
|
|
18
|
+
tenant_id: 'z2-isb',
|
|
19
|
+
brand_id: 'brand-1',
|
|
20
|
+
scope_context: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE,
|
|
21
|
+
scope_field: '2026-09-30',
|
|
22
|
+
day_index: ENUMS_1.DAY_INDEX_ENUM.WED,
|
|
23
|
+
sale_type_key_filters: [...MATERIALIZED_REPORTS_1.SALES_OVERVIEW_KEY_FILTERS],
|
|
24
|
+
sale_type_metrics: {},
|
|
25
|
+
iteration: 3,
|
|
26
|
+
schema_version: 1,
|
|
27
|
+
source_watermark: new Date('2026-09-30T10:00:00.000Z'),
|
|
28
|
+
computed_at: new Date('2026-09-30T11:00:00.000Z'),
|
|
29
|
+
createdAt: new Date('2026-09-30T10:00:00.000Z'),
|
|
30
|
+
updatedAt: new Date('2026-09-30T11:00:00.000Z'),
|
|
31
|
+
...overrides,
|
|
32
|
+
});
|
|
33
|
+
const SALES_OVERVIEW = { reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_SALES_OVERVIEW, reason: 'NEW_DAY' };
|
|
34
|
+
describe('buildMaterializedTenantReportIteration', () => {
|
|
35
|
+
it('builds the history row for the report document’s current iteration', () => {
|
|
36
|
+
const report = materializedReport();
|
|
37
|
+
const computedAt = new Date('2026-09-30T12:00:00.000Z');
|
|
38
|
+
const row = expectNonNull((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(report, { ...SALES_OVERVIEW, computedAt }));
|
|
39
|
+
expect(row.report_type).toBe(MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_SALES_OVERVIEW);
|
|
40
|
+
expect(row.report_id).toBe(report._id);
|
|
41
|
+
expect(row.iteration).toBe(3);
|
|
42
|
+
expect(row.schema_version).toBe(1);
|
|
43
|
+
expect(row.reason).toBe('NEW_DAY');
|
|
44
|
+
expect(row.snapshot).toBe(report); // full post-write document, by reference
|
|
45
|
+
expect(row.createdAt).toEqual(computedAt);
|
|
46
|
+
expect(row.updatedAt).toEqual(computedAt);
|
|
47
|
+
expect(row).not.toHaveProperty('_id'); // assigned by MongoDB on the write
|
|
48
|
+
});
|
|
49
|
+
it('defaults documents that never went through an update to iteration 1', () => {
|
|
50
|
+
const fresh = materializedReport({ iteration: undefined }); // raw convert output
|
|
51
|
+
const row = expectNonNull((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(fresh, SALES_OVERVIEW));
|
|
52
|
+
expect(row.iteration).toBe(1);
|
|
53
|
+
});
|
|
54
|
+
it('accepts a hydrated ObjectId `_id` and stores the string form as report_id', () => {
|
|
55
|
+
const objectId = new mongoose_1.default.Types.ObjectId('68dd3f9c9f1b2c3d4e5f6a7b');
|
|
56
|
+
const hydrated = { ...materializedReport(), _id: objectId };
|
|
57
|
+
const row = expectNonNull((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(hydrated, SALES_OVERVIEW));
|
|
58
|
+
expect(row.report_id).toBe('68dd3f9c9f1b2c3d4e5f6a7b');
|
|
59
|
+
});
|
|
60
|
+
it('returns null (never throws) for invalid input', () => {
|
|
61
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(null, SALES_OVERVIEW)).toBeNull();
|
|
62
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(undefined, SALES_OVERVIEW)).toBeNull();
|
|
63
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(materializedReport({ _id: '' }), SALES_OVERVIEW)).toBeNull();
|
|
64
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(materializedReport({ schema_version: undefined }), SALES_OVERVIEW)).toBeNull();
|
|
65
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(materializedReport({ iteration: 0 }), SALES_OVERVIEW)).toBeNull();
|
|
66
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(materializedReport(), {
|
|
67
|
+
reportType: 'NOPE',
|
|
68
|
+
reason: 'NEW_DAY',
|
|
69
|
+
})).toBeNull();
|
|
70
|
+
expect((0, materialized_tenant_reports_iterations_helpers_1.buildMaterializedTenantReportIteration)(materializedReport(), {
|
|
71
|
+
reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_SALES_OVERVIEW,
|
|
72
|
+
reason: '',
|
|
73
|
+
})).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
});
|
package/lib/tests/materialized-reports/materialized-tenant-reports-iterations-schema.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|