@managesome/eposmatic-toolkit 0.4.55 → 0.4.56
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 +91 -0
- package/esm/helpers/materialized-reports/index.js +7 -0
- package/esm/helpers/materialized-reports/materialized-dialer-accumulator-helpers.js +100 -0
- package/esm/helpers/materialized-reports/materialized-dialer-close-day-helpers.js +328 -0
- package/esm/helpers/materialized-reports/materialized-dialer-compile-helpers.js +180 -0
- package/esm/helpers/materialized-reports/materialized-dialer-entry-pages.js +222 -0
- package/esm/helpers/materialized-reports/materialized-dialer-key-helpers.js +82 -0
- package/esm/helpers/materialized-reports/materialized-dialer-masking.js +54 -0
- package/esm/helpers/materialized-reports/materialized-index-bootstrap.js +4 -0
- package/esm/helpers/materialized-reports/materialized-report-drilldown-rows.js +13 -1
- package/esm/helpers/materialized-reports/report-platform/definition.js +85 -1
- package/esm/helpers/materialized-reports/tenant-dialer-formatter.js +95 -0
- package/esm/helpers/reporting-contract/report-contract.js +3 -0
- package/esm/schemas/models/index.js +2 -0
- package/esm/schemas/models/materialized_report_drilldown_rows.js +1 -0
- package/esm/schemas/models/materialized_tenant_dialer_entries.js +65 -0
- package/esm/schemas/models/materialized_tenant_dialer_reports.js +66 -0
- package/esm/schemas/types/index.js +2 -0
- package/esm/schemas/types/materialized_report_drilldown_rows.js +1 -0
- package/esm/schemas/types/materialized_tenant_dialer_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_dialer_reports.js +7 -0
- package/lib/constants/MATERIALIZED_REPORTS.d.ts +72 -2
- package/lib/constants/MATERIALIZED_REPORTS.js +93 -1
- package/lib/helpers/materialized-reports/index.d.ts +7 -0
- package/lib/helpers/materialized-reports/index.js +7 -0
- package/lib/helpers/materialized-reports/materialized-dialer-accumulator-helpers.d.ts +39 -0
- package/lib/helpers/materialized-reports/materialized-dialer-accumulator-helpers.js +110 -0
- package/lib/helpers/materialized-reports/materialized-dialer-close-day-helpers.d.ts +90 -0
- package/lib/helpers/materialized-reports/materialized-dialer-close-day-helpers.js +340 -0
- package/lib/helpers/materialized-reports/materialized-dialer-compile-helpers.d.ts +67 -0
- package/lib/helpers/materialized-reports/materialized-dialer-compile-helpers.js +183 -0
- package/lib/helpers/materialized-reports/materialized-dialer-entry-pages.d.ts +97 -0
- package/lib/helpers/materialized-reports/materialized-dialer-entry-pages.js +235 -0
- package/lib/helpers/materialized-reports/materialized-dialer-key-helpers.d.ts +51 -0
- package/lib/helpers/materialized-reports/materialized-dialer-key-helpers.js +90 -0
- package/lib/helpers/materialized-reports/materialized-dialer-masking.d.ts +35 -0
- package/lib/helpers/materialized-reports/materialized-dialer-masking.js +57 -0
- package/lib/helpers/materialized-reports/materialized-index-bootstrap.js +4 -0
- package/lib/helpers/materialized-reports/materialized-report-drilldown-rows.js +13 -1
- package/lib/helpers/materialized-reports/report-platform/definition.js +84 -0
- package/lib/helpers/materialized-reports/tenant-dialer-formatter.d.ts +91 -0
- package/lib/helpers/materialized-reports/tenant-dialer-formatter.js +98 -0
- package/lib/helpers/reporting-contract/report-contract.d.ts +1 -0
- package/lib/helpers/reporting-contract/report-contract.js +3 -0
- package/lib/schemas/models/index.d.ts +2 -0
- package/lib/schemas/models/index.js +2 -0
- package/lib/schemas/models/materialized_report_drilldown_rows.js +1 -0
- package/lib/schemas/models/materialized_tenant_dialer_entries.d.ts +107 -0
- package/lib/schemas/models/materialized_tenant_dialer_entries.js +68 -0
- package/lib/schemas/models/materialized_tenant_dialer_reports.d.ts +100 -0
- package/lib/schemas/models/materialized_tenant_dialer_reports.js +69 -0
- package/lib/schemas/models/tenant_dialer_events.d.ts +3 -3
- package/lib/schemas/types/index.d.ts +2 -0
- package/lib/schemas/types/index.js +2 -0
- package/lib/schemas/types/materialized_report_drilldown_rows.d.ts +1 -1
- package/lib/schemas/types/materialized_report_drilldown_rows.js +1 -0
- package/lib/schemas/types/materialized_tenant_dialer_entries.d.ts +83 -0
- package/lib/schemas/types/materialized_tenant_dialer_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_dialer_reports.d.ts +77 -0
- package/lib/schemas/types/materialized_tenant_dialer_reports.js +10 -0
- package/lib/tests/materialized-reports/materialized-dialer-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-dialer-compile.test.js +213 -0
- package/lib/tests/materialized-reports/materialized-dialer-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-dialer-formatter.test.js +159 -0
- package/lib/tests/materialized-reports/materialized-dialer-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-dialer-plan.test.js +223 -0
- package/lib/tests/materialized-reports/materialized-tenant-dialer-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-dialer-schema.test.js +183 -0
- package/lib/tests/materialized-reports/report-platform/registry-conformance.test.js +16 -3
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phone masking for the Dialer report.
|
|
3
|
+
*
|
|
4
|
+
* ## Why mask at all
|
|
5
|
+
*
|
|
6
|
+
* A dialer event is a personal call record: the caller number is customer PII
|
|
7
|
+
* and the staff number is employee PII. The materialized report is a long-lived
|
|
8
|
+
* read model served to any operator with report access, so the RAW source
|
|
9
|
+
* numbers must never enter it. Masking happens ONCE, at COMPILE time: stored
|
|
10
|
+
* rows and every API response derived from them carry only masked values.
|
|
11
|
+
*
|
|
12
|
+
* ## The rule
|
|
13
|
+
*
|
|
14
|
+
* - keep the last FOUR digits (enough for an operator to correlate a caller
|
|
15
|
+
* across events of the same call, which is all the page needs);
|
|
16
|
+
* - replace EVERY other digit with `*`;
|
|
17
|
+
* - keep a leading `+` when the source carries one, and DROP every other
|
|
18
|
+
* separator (spaces/dashes) so the mask cannot leak the number's grouping.
|
|
19
|
+
*
|
|
20
|
+
* Examples:
|
|
21
|
+
* `+923001234567` → `+********4567`
|
|
22
|
+
* `0300-1234567` → `*******4567`
|
|
23
|
+
* `null` → `null`
|
|
24
|
+
* `"12"` → `**` (nothing is exposed for a number shorter than 5 digits)
|
|
25
|
+
*
|
|
26
|
+
* The function is TOTAL and deterministic: it never throws, so a malformed
|
|
27
|
+
* source value can never fail a close.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Masks one phone number (see the header for the exact rule).
|
|
31
|
+
*
|
|
32
|
+
* Returns `null` for `null` / empty input, so a missing source number stays
|
|
33
|
+
* "unmeasured" rather than becoming the string `"null"`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function maskDialerPhoneNumber(value: unknown): string | null;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Phone masking for the Dialer report.
|
|
4
|
+
*
|
|
5
|
+
* ## Why mask at all
|
|
6
|
+
*
|
|
7
|
+
* A dialer event is a personal call record: the caller number is customer PII
|
|
8
|
+
* and the staff number is employee PII. The materialized report is a long-lived
|
|
9
|
+
* read model served to any operator with report access, so the RAW source
|
|
10
|
+
* numbers must never enter it. Masking happens ONCE, at COMPILE time: stored
|
|
11
|
+
* rows and every API response derived from them carry only masked values.
|
|
12
|
+
*
|
|
13
|
+
* ## The rule
|
|
14
|
+
*
|
|
15
|
+
* - keep the last FOUR digits (enough for an operator to correlate a caller
|
|
16
|
+
* across events of the same call, which is all the page needs);
|
|
17
|
+
* - replace EVERY other digit with `*`;
|
|
18
|
+
* - keep a leading `+` when the source carries one, and DROP every other
|
|
19
|
+
* separator (spaces/dashes) so the mask cannot leak the number's grouping.
|
|
20
|
+
*
|
|
21
|
+
* Examples:
|
|
22
|
+
* `+923001234567` → `+********4567`
|
|
23
|
+
* `0300-1234567` → `*******4567`
|
|
24
|
+
* `null` → `null`
|
|
25
|
+
* `"12"` → `**` (nothing is exposed for a number shorter than 5 digits)
|
|
26
|
+
*
|
|
27
|
+
* The function is TOTAL and deterministic: it never throws, so a malformed
|
|
28
|
+
* source value can never fail a close.
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.maskDialerPhoneNumber = maskDialerPhoneNumber;
|
|
32
|
+
const DIGIT_PATTERN = /\d/g;
|
|
33
|
+
/**
|
|
34
|
+
* Masks one phone number (see the header for the exact rule).
|
|
35
|
+
*
|
|
36
|
+
* Returns `null` for `null` / empty input, so a missing source number stays
|
|
37
|
+
* "unmeasured" rather than becoming the string `"null"`.
|
|
38
|
+
*/
|
|
39
|
+
function maskDialerPhoneNumber(value) {
|
|
40
|
+
if (value == null)
|
|
41
|
+
return null;
|
|
42
|
+
const raw = String(value).trim();
|
|
43
|
+
if (raw === '')
|
|
44
|
+
return null;
|
|
45
|
+
const digits = raw.match(DIGIT_PATTERN) ?? [];
|
|
46
|
+
if (digits.length === 0) {
|
|
47
|
+
// No number to mask: do not echo arbitrary text (it may itself be PII).
|
|
48
|
+
return '****';
|
|
49
|
+
}
|
|
50
|
+
if (digits.length <= 4) {
|
|
51
|
+
// Too short to reveal ANY digit: the last-four rule would expose half of it.
|
|
52
|
+
return '*'.repeat(digits.length);
|
|
53
|
+
}
|
|
54
|
+
const visible = digits.slice(-4).join('');
|
|
55
|
+
const masked = '*'.repeat(digits.length - 4) + visible;
|
|
56
|
+
return raw.startsWith('+') ? `+${masked}` : masked;
|
|
57
|
+
}
|
|
@@ -9,6 +9,8 @@ const materialized_tenant_delivery_entries_1 = require("../../schemas/models/mat
|
|
|
9
9
|
const materialized_tenant_delivery_geo_cells_1 = require("../../schemas/models/materialized_tenant_delivery_geo_cells");
|
|
10
10
|
const materialized_tenant_delivery_geo_scopes_1 = require("../../schemas/models/materialized_tenant_delivery_geo_scopes");
|
|
11
11
|
const materialized_tenant_delivery_reports_1 = require("../../schemas/models/materialized_tenant_delivery_reports");
|
|
12
|
+
const materialized_tenant_dialer_entries_1 = require("../../schemas/models/materialized_tenant_dialer_entries");
|
|
13
|
+
const materialized_tenant_dialer_reports_1 = require("../../schemas/models/materialized_tenant_dialer_reports");
|
|
12
14
|
const materialized_tenant_discount_entries_1 = require("../../schemas/models/materialized_tenant_discount_entries");
|
|
13
15
|
const materialized_tenant_discount_reports_1 = require("../../schemas/models/materialized_tenant_discount_reports");
|
|
14
16
|
const materialized_tenant_discount_sources_1 = require("../../schemas/models/materialized_tenant_discount_sources");
|
|
@@ -46,6 +48,8 @@ const INDEXES = {
|
|
|
46
48
|
[MATERIALIZED_REPORTS_1.MATERIALIZED_TENANT_DELIVERY_GEO_SCOPES_COLLECTION_NAME]: materialized_tenant_delivery_geo_scopes_1.MATERIALIZED_TENANT_DELIVERY_GEO_SCOPES_INDEX_OPTIONS,
|
|
47
49
|
[materialized_tenant_delivery_entries_1.MATERIALIZED_TENANT_DELIVERY_ENTRIES_COLLECTION_NAME]: materialized_tenant_delivery_entries_1.MATERIALIZED_TENANT_DELIVERY_ENTRIES_INDEX_OPTIONS,
|
|
48
50
|
[materialized_tenant_delivery_reports_1.MATERIALIZED_TENANT_DELIVERY_REPORTS_COLLECTION_NAME]: materialized_tenant_delivery_reports_1.MATERIALIZED_TENANT_DELIVERY_REPORTS_INDEX_OPTIONS,
|
|
51
|
+
[materialized_tenant_dialer_reports_1.MATERIALIZED_TENANT_DIALER_REPORTS_COLLECTION_NAME]: materialized_tenant_dialer_reports_1.MATERIALIZED_TENANT_DIALER_REPORTS_INDEX_OPTIONS,
|
|
52
|
+
[materialized_tenant_dialer_entries_1.MATERIALIZED_TENANT_DIALER_ENTRIES_COLLECTION_NAME]: materialized_tenant_dialer_entries_1.MATERIALIZED_TENANT_DIALER_ENTRIES_INDEX_OPTIONS,
|
|
49
53
|
[materialized_report_drilldown_rows_1.MATERIALIZED_REPORT_DRILLDOWN_ROWS_COLLECTION_NAME]: materialized_report_drilldown_rows_1.MATERIALIZED_REPORT_DRILLDOWN_ROWS_INDEX_OPTIONS,
|
|
50
54
|
[materialized_report_drilldown_rows_1.MATERIALIZED_REPORT_DRILLDOWN_SCOPES_COLLECTION_NAME]: materialized_report_drilldown_rows_1.MATERIALIZED_REPORT_DRILLDOWN_SCOPES_INDEX_OPTIONS,
|
|
51
55
|
[tenant_calendar_1.TENANT_CALENDAR_COLLECTION_NAME]: tenant_calendar_1.TENANT_CALENDAR_INDEX_OPTIONS,
|
|
@@ -66,6 +66,14 @@ const ROW_SPECS = {
|
|
|
66
66
|
orderId: (row) => row.order_id,
|
|
67
67
|
cursorId: (row) => row.payment_id,
|
|
68
68
|
},
|
|
69
|
+
[MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DIALER_ENTRIES]: {
|
|
70
|
+
rowsKey: 'dialer_entries',
|
|
71
|
+
// `created_at` is an ISO string on the dialer row; `toDate` accepts both.
|
|
72
|
+
time: (row) => row.created_at,
|
|
73
|
+
// Dialer rows are EVENT rows, not order rows (like cash ledger rows).
|
|
74
|
+
orderId: () => '',
|
|
75
|
+
cursorId: (row) => row.event_id,
|
|
76
|
+
},
|
|
69
77
|
};
|
|
70
78
|
/** The nested map key an entry collection uses for its row sections. */
|
|
71
79
|
const getDrilldownRowsKey = (reportType) => ROW_SPECS[reportType].rowsKey;
|
|
@@ -109,7 +117,11 @@ function buildMaterializedDrilldownRows(reportType, document, sourceLocalDate =
|
|
|
109
117
|
// Discounts are served only when the row carries its kind; the nested
|
|
110
118
|
// collector applies the same requirement before it can be viewed.
|
|
111
119
|
const kindMissing = reportType === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DISCOUNT_ENTRIES && asString(row.kind) === '';
|
|
112
|
-
|
|
120
|
+
// Cash and Dialer rows are ledger/event rows and have no `order_id`; every
|
|
121
|
+
// other report's identity includes the order it belongs to.
|
|
122
|
+
const orderMissing = reportType !== MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_CASH_ENTRIES &&
|
|
123
|
+
reportType !== MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DIALER_ENTRIES &&
|
|
124
|
+
orderId === '';
|
|
113
125
|
if (time == null || cursorId === '' || kindMissing || orderMissing) {
|
|
114
126
|
skipped += 1;
|
|
115
127
|
continue;
|
|
@@ -430,17 +430,101 @@ const DELIVERY_DEFINITION = {
|
|
|
430
430
|
'Historical totals do not pin schema_version today (baseline debt).',
|
|
431
431
|
],
|
|
432
432
|
};
|
|
433
|
+
const DIALER_DEFINITION = {
|
|
434
|
+
key: report_contract_1.REPORT_KEY_ENUM.DIALER,
|
|
435
|
+
segment: 'dialer',
|
|
436
|
+
reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DIALER_REPORTS,
|
|
437
|
+
capabilities: { live: true, historical: true, details: true },
|
|
438
|
+
status: REPORT_DEFINITION_STATUS.PRODUCTION,
|
|
439
|
+
report: {
|
|
440
|
+
name: 'materialized_tenant_dialer_reports',
|
|
441
|
+
schemaVersion: 1,
|
|
442
|
+
budgetBytes: MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_REPORT_MAX_BSON_BYTES,
|
|
443
|
+
enforced: true,
|
|
444
|
+
validatorFile: null,
|
|
445
|
+
validatorDebt: 'No schema validator exists for the dialer report collection yet.',
|
|
446
|
+
indexOwner: 'toolkit:MATERIALIZED_TENANT_DIALER_REPORTS_INDEX_OPTIONS',
|
|
447
|
+
migrationId: null,
|
|
448
|
+
},
|
|
449
|
+
entries: {
|
|
450
|
+
name: 'materialized_tenant_dialer_entries',
|
|
451
|
+
schemaVersion: 1,
|
|
452
|
+
budgetBytes: MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_ENTRY_MAX_BSON_BYTES,
|
|
453
|
+
enforced: true,
|
|
454
|
+
validatorFile: null,
|
|
455
|
+
validatorDebt: 'No schema validator exists for the dialer entry collection yet.',
|
|
456
|
+
indexOwner: 'toolkit:MATERIALIZED_TENANT_DIALER_ENTRIES_INDEX_OPTIONS',
|
|
457
|
+
migrationId: null,
|
|
458
|
+
},
|
|
459
|
+
sideCollections: [FLAT_ROWS, FLAT_SCOPES],
|
|
460
|
+
reportScopes: [...MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_REPORT_SCOPES],
|
|
461
|
+
entryScopes: [...MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_ENTRY_SCOPES],
|
|
462
|
+
entryStorage: REPORT_ENTRY_STORAGE.PAGE_PER_SOURCE_DAY,
|
|
463
|
+
entrySplit: REPORT_ENTRY_SPLIT.DETERMINISTIC_SUBPAGES,
|
|
464
|
+
maxReportScope: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_YEAR,
|
|
465
|
+
maxEntryScope: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_MONTH,
|
|
466
|
+
projections: [REPORT_PROJECTION.FLAT_DRILLDOWN],
|
|
467
|
+
budgets: {
|
|
468
|
+
materialized_tenant_dialer_reports: MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_REPORT_MAX_BSON_BYTES,
|
|
469
|
+
materialized_tenant_dialer_entries: MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_ENTRY_MAX_BSON_BYTES,
|
|
470
|
+
materialized_report_drilldown_rows: DOCUMENT_BUDGET,
|
|
471
|
+
materialized_report_drilldown_scopes: DOCUMENT_BUDGET,
|
|
472
|
+
},
|
|
473
|
+
retention: [],
|
|
474
|
+
writeGuard: REPORT_WRITE_GUARD.WATERMARK,
|
|
475
|
+
liveSource: REPORT_LIVE_SOURCE.RAW,
|
|
476
|
+
historicalLens: REPORT_HISTORICAL_LENS.DOCUMENT_FOLD,
|
|
477
|
+
completeness: { summary: 'NONE', details: 'FLAT_PROJECTION' },
|
|
478
|
+
filters: [
|
|
479
|
+
{
|
|
480
|
+
id: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_KEY_FILTER_ENUM.ACTION,
|
|
481
|
+
kind: 'KEY_COMPONENT',
|
|
482
|
+
mode: 'SERVER',
|
|
483
|
+
appliesTo: 'BOTH',
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
id: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_KEY_FILTER_ENUM.POS_ID,
|
|
487
|
+
kind: 'KEY_COMPONENT',
|
|
488
|
+
mode: 'SERVER',
|
|
489
|
+
appliesTo: 'BOTH',
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
id: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_KEY_FILTER_ENUM.STAFF_ID,
|
|
493
|
+
kind: 'KEY_COMPONENT',
|
|
494
|
+
mode: 'SERVER',
|
|
495
|
+
appliesTo: 'BOTH',
|
|
496
|
+
},
|
|
497
|
+
{ id: 'DETAILS_VIEW', kind: 'REQUEST', mode: 'SERVER', appliesTo: 'DETAILS' },
|
|
498
|
+
],
|
|
499
|
+
cursor: REPORT_CURSOR_KIND.KEYSET_STRUCTURED,
|
|
500
|
+
adapters: {
|
|
501
|
+
writer: 'materializeDialerReport',
|
|
502
|
+
live: 'getLiveTenantDialerReports',
|
|
503
|
+
historical: 'getMaterializedTenantDialerReports',
|
|
504
|
+
details: 'getMaterializedDialerDetailsPage',
|
|
505
|
+
},
|
|
506
|
+
owner: 'reporting-platform',
|
|
507
|
+
notes: [
|
|
508
|
+
'Append-only event source: unattributed events (no localDate) are never assigned to a day.',
|
|
509
|
+
'No duration and no order attribution exist; the page derives every rate.',
|
|
510
|
+
'Counters are filtered by ACTION / POS_ID / STAFF_ID key components server-side.',
|
|
511
|
+
'Page entries split deterministically into #N sub-pages when over the 15 MiB budget.',
|
|
512
|
+
'Late events are not included until the day is re-closed.',
|
|
513
|
+
],
|
|
514
|
+
};
|
|
433
515
|
exports.REPORT_DEFINITIONS = {
|
|
434
516
|
[OVERVIEW_DEFINITION.key]: OVERVIEW_DEFINITION,
|
|
435
517
|
[DISCOUNTS_DEFINITION.key]: DISCOUNTS_DEFINITION,
|
|
436
518
|
[PREP_TIME_DEFINITION.key]: PREP_TIME_DEFINITION,
|
|
437
519
|
[DELIVERY_DEFINITION.key]: DELIVERY_DEFINITION,
|
|
520
|
+
[DIALER_DEFINITION.key]: DIALER_DEFINITION,
|
|
438
521
|
};
|
|
439
522
|
exports.PRODUCTION_REPORT_DEFINITIONS = [
|
|
440
523
|
OVERVIEW_DEFINITION,
|
|
441
524
|
DISCOUNTS_DEFINITION,
|
|
442
525
|
PREP_TIME_DEFINITION,
|
|
443
526
|
DELIVERY_DEFINITION,
|
|
527
|
+
DIALER_DEFINITION,
|
|
444
528
|
];
|
|
445
529
|
exports.REPORT_REGISTRY_EXEMPTIONS = {
|
|
446
530
|
[report_contract_1.REPORT_KEY_ENUM.CASH_IN_OUT]: {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { IMaterializedTenantDialerReport } from '../../schemas/types/materialized_tenant_dialer_reports';
|
|
2
|
+
import { IDialerKeyFilters } from './materialized-dialer-key-helpers';
|
|
3
|
+
/**
|
|
4
|
+
* Frontend formatter for `materialized_tenant_dialer_reports`.
|
|
5
|
+
*
|
|
6
|
+
* The stored documents are COUNTS ONLY. Everything a page shows on top of the
|
|
7
|
+
* counts is DERIVED here (never stored): the answer rate, the missed rate and
|
|
8
|
+
* the per-action / per-terminal / per-staff groupings. There is no duration and
|
|
9
|
+
* no order attribution, so the formatter exposes none — inventing either would
|
|
10
|
+
* be a report-level lie.
|
|
11
|
+
*
|
|
12
|
+
* ## Approved rate contract
|
|
13
|
+
*
|
|
14
|
+
* `outcome_denominator = answered + missed + declined`, so
|
|
15
|
+
*
|
|
16
|
+
* - `answer_rate = answered / outcome_denominator`
|
|
17
|
+
* - `missed_rate = missed / outcome_denominator`
|
|
18
|
+
*
|
|
19
|
+
* A rate is a PERCENTAGE rounded to 2 decimals and is `null` when the
|
|
20
|
+
* denominator is 0. It is NEVER `answered / events`: `events` includes
|
|
21
|
+
* `INCOMING_CALL`, `OUTGOING_CALL`, `CALL_ENDED` and `POS_PING`, which are not
|
|
22
|
+
* call outcomes and would understate every rate. The same denominator applies to
|
|
23
|
+
* the summary AND every breakdown row.
|
|
24
|
+
*
|
|
25
|
+
* The formatter takes the documents of ONE scope level (e.g. the `localMonth`
|
|
26
|
+
* documents of a selection, or the `localDate` documents of one day) and folds
|
|
27
|
+
* them into one page payload. It is pure and never throws.
|
|
28
|
+
*/
|
|
29
|
+
export interface IFormattedDialerSummary {
|
|
30
|
+
events: number;
|
|
31
|
+
incoming_calls: number;
|
|
32
|
+
outgoing_calls: number;
|
|
33
|
+
answered: number;
|
|
34
|
+
missed: number;
|
|
35
|
+
declined: number;
|
|
36
|
+
ended: number;
|
|
37
|
+
pos_pings: number;
|
|
38
|
+
/**
|
|
39
|
+
* `answered / (answered + missed + declined)` as a percentage (2dp) —
|
|
40
|
+
* DERIVED, never stored; null when the outcome denominator is 0.
|
|
41
|
+
*/
|
|
42
|
+
answer_rate: number | null;
|
|
43
|
+
/**
|
|
44
|
+
* `missed / (answered + missed + declined)` as a percentage (2dp) —
|
|
45
|
+
* DERIVED, never stored; null when the outcome denominator is 0.
|
|
46
|
+
*/
|
|
47
|
+
missed_rate: number | null;
|
|
48
|
+
}
|
|
49
|
+
/** One hour bucket of the call-activity series (`hour` 0..23, label `"0"`..`"23"`). */
|
|
50
|
+
export interface IFormattedDialerHourRow {
|
|
51
|
+
hour: number;
|
|
52
|
+
label: string;
|
|
53
|
+
events: number;
|
|
54
|
+
}
|
|
55
|
+
/** One grouped breakdown row (by action / terminal / staff). */
|
|
56
|
+
export interface IFormattedDialerBreakdownRow {
|
|
57
|
+
key: string;
|
|
58
|
+
events: number;
|
|
59
|
+
answered: number;
|
|
60
|
+
missed: number;
|
|
61
|
+
declined: number;
|
|
62
|
+
/**
|
|
63
|
+
* `answered / (answered + missed + declined)` as a percentage (2dp); null
|
|
64
|
+
* when the group has no outcome events. `events` is NOT the denominator.
|
|
65
|
+
*/
|
|
66
|
+
answer_rate: number | null;
|
|
67
|
+
}
|
|
68
|
+
export interface IFormattedDialerPageData {
|
|
69
|
+
tenant_ids: string[];
|
|
70
|
+
summary: IFormattedDialerSummary;
|
|
71
|
+
/** All 24 hours, ascending — an absent hour is an explicit zero. */
|
|
72
|
+
by_hour: IFormattedDialerHourRow[];
|
|
73
|
+
by_action: IFormattedDialerBreakdownRow[];
|
|
74
|
+
by_pos: IFormattedDialerBreakdownRow[];
|
|
75
|
+
by_staff: IFormattedDialerBreakdownRow[];
|
|
76
|
+
/** The scope level the documents covered (diagnostics for the page header). */
|
|
77
|
+
scopes: {
|
|
78
|
+
scope_context: string;
|
|
79
|
+
scope_field: string;
|
|
80
|
+
}[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Formats the report documents of one scope level into the page payload.
|
|
84
|
+
*
|
|
85
|
+
* `documents` may also be the single record returned by a live/historical read
|
|
86
|
+
* for one tenant. Key filters are applied here as well, so a client that only
|
|
87
|
+
* has unfiltered documents can still narrow them consistently with the server.
|
|
88
|
+
*/
|
|
89
|
+
export declare function formatMaterializedDialerReport(documents: readonly IMaterializedTenantDialerReport[] | null | undefined, options?: {
|
|
90
|
+
filters?: IDialerKeyFilters | null;
|
|
91
|
+
}): IFormattedDialerPageData;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatMaterializedDialerReport = formatMaterializedDialerReport;
|
|
4
|
+
const MATERIALIZED_REPORTS_1 = require("../../constants/MATERIALIZED_REPORTS");
|
|
5
|
+
const materialized_dialer_accumulator_helpers_1 = require("./materialized-dialer-accumulator-helpers");
|
|
6
|
+
const materialized_dialer_key_helpers_1 = require("./materialized-dialer-key-helpers");
|
|
7
|
+
const percent = (numerator, denominator) => {
|
|
8
|
+
if (!Number.isFinite(denominator) || denominator <= 0)
|
|
9
|
+
return null;
|
|
10
|
+
return Math.round((numerator / denominator) * 10000) / 100;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The ONLY rate denominator of the Dialer contract:
|
|
14
|
+
* `answered + missed + declined`. Every other event (incoming/outgoing/ended/
|
|
15
|
+
* ping) is activity, not an outcome, and must not dilute the rate.
|
|
16
|
+
*/
|
|
17
|
+
const outcomeDenominator = (answered, missed, declined) => (Number(answered) || 0) + (Number(missed) || 0) + (Number(declined) || 0);
|
|
18
|
+
const summaryOf = (counters) => ({
|
|
19
|
+
events: counters.events,
|
|
20
|
+
incoming_calls: counters.incoming_calls,
|
|
21
|
+
outgoing_calls: counters.outgoing_calls,
|
|
22
|
+
answered: counters.answered,
|
|
23
|
+
missed: counters.missed,
|
|
24
|
+
declined: counters.declined,
|
|
25
|
+
ended: counters.ended,
|
|
26
|
+
pos_pings: counters.pos_pings,
|
|
27
|
+
answer_rate: percent(counters.answered, outcomeDenominator(counters.answered, counters.missed, counters.declined)),
|
|
28
|
+
missed_rate: percent(counters.missed, outcomeDenominator(counters.answered, counters.missed, counters.declined)),
|
|
29
|
+
});
|
|
30
|
+
const addBreakdown = (target, counters) => {
|
|
31
|
+
target.events += counters.events;
|
|
32
|
+
target.answered += counters.answered;
|
|
33
|
+
target.missed += counters.missed;
|
|
34
|
+
target.declined += counters.declined;
|
|
35
|
+
};
|
|
36
|
+
const breakdownRows = (map) => [...map.entries()]
|
|
37
|
+
.map(([key, value]) => ({
|
|
38
|
+
key,
|
|
39
|
+
events: value.events,
|
|
40
|
+
answered: value.answered,
|
|
41
|
+
missed: value.missed,
|
|
42
|
+
declined: value.declined,
|
|
43
|
+
answer_rate: percent(value.answered, outcomeDenominator(value.answered, value.missed, value.declined)),
|
|
44
|
+
}))
|
|
45
|
+
.sort((a, b) => b.events - a.events || (a.key < b.key ? -1 : a.key > b.key ? 1 : 0));
|
|
46
|
+
/**
|
|
47
|
+
* Formats the report documents of one scope level into the page payload.
|
|
48
|
+
*
|
|
49
|
+
* `documents` may also be the single record returned by a live/historical read
|
|
50
|
+
* for one tenant. Key filters are applied here as well, so a client that only
|
|
51
|
+
* has unfiltered documents can still narrow them consistently with the server.
|
|
52
|
+
*/
|
|
53
|
+
function formatMaterializedDialerReport(documents, options = {}) {
|
|
54
|
+
const docs = (documents ?? []).filter((doc) => doc != null);
|
|
55
|
+
const filters = options.filters ?? null;
|
|
56
|
+
const total = (0, materialized_dialer_accumulator_helpers_1.freshDialerCounters)();
|
|
57
|
+
const byAction = new Map();
|
|
58
|
+
const byPos = new Map();
|
|
59
|
+
const byStaff = new Map();
|
|
60
|
+
const tenantIds = new Set();
|
|
61
|
+
const scopes = new Set();
|
|
62
|
+
const bump = (map, key, counters) => {
|
|
63
|
+
const target = map.get(key) ?? { events: 0, answered: 0, missed: 0, declined: 0 };
|
|
64
|
+
addBreakdown(target, counters);
|
|
65
|
+
map.set(key, target);
|
|
66
|
+
};
|
|
67
|
+
for (const doc of docs) {
|
|
68
|
+
if (doc.tenant_id != null)
|
|
69
|
+
tenantIds.add(String(doc.tenant_id));
|
|
70
|
+
scopes.add(`${String(doc.scope_context)}|${String(doc.scope_field)}`);
|
|
71
|
+
for (const [key, block] of Object.entries(doc.dialer_counters ?? {})) {
|
|
72
|
+
if (!(0, materialized_dialer_key_helpers_1.dialerKeyPassesFilters)(key, filters))
|
|
73
|
+
continue;
|
|
74
|
+
(0, materialized_dialer_accumulator_helpers_1.mergeDialerCounters)(total, block);
|
|
75
|
+
const parsed = (0, materialized_dialer_key_helpers_1.parseMaterializedDialerKey)(key);
|
|
76
|
+
bump(byAction, parsed?.action ?? key, block);
|
|
77
|
+
bump(byPos, parsed?.pos_id ?? key, block);
|
|
78
|
+
bump(byStaff, parsed?.staff_id ?? key, block);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const byHour = MATERIALIZED_REPORTS_1.MATERIALIZED_DIALER_HOUR_KEYS.map((label) => ({
|
|
82
|
+
hour: Number(label),
|
|
83
|
+
label,
|
|
84
|
+
events: Number(total.by_hour?.[label]) || 0,
|
|
85
|
+
}));
|
|
86
|
+
return {
|
|
87
|
+
tenant_ids: [...tenantIds].sort(),
|
|
88
|
+
summary: summaryOf(total),
|
|
89
|
+
by_hour: byHour,
|
|
90
|
+
by_action: breakdownRows(byAction),
|
|
91
|
+
by_pos: breakdownRows(byPos),
|
|
92
|
+
by_staff: breakdownRows(byStaff),
|
|
93
|
+
scopes: [...scopes].sort().map((identity) => {
|
|
94
|
+
const [scope_context, scope_field] = identity.split('|');
|
|
95
|
+
return { scope_context, scope_field };
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -28,6 +28,7 @@ export declare enum REPORT_KEY_ENUM {
|
|
|
28
28
|
PREP_TIME = "PREP_TIME",
|
|
29
29
|
CASH_IN_OUT = "CASH_IN_OUT",
|
|
30
30
|
DELIVERY = "DELIVERY",
|
|
31
|
+
DIALER = "DIALER",
|
|
31
32
|
SALES_COMPARISON = "SALES_COMPARISON",
|
|
32
33
|
HOURLY_COMPARISON = "HOURLY_COMPARISON",
|
|
33
34
|
PAYMENTS_COMPARISON = "PAYMENTS_COMPARISON",
|
|
@@ -41,6 +41,7 @@ var REPORT_KEY_ENUM;
|
|
|
41
41
|
REPORT_KEY_ENUM["PREP_TIME"] = "PREP_TIME";
|
|
42
42
|
REPORT_KEY_ENUM["CASH_IN_OUT"] = "CASH_IN_OUT";
|
|
43
43
|
REPORT_KEY_ENUM["DELIVERY"] = "DELIVERY";
|
|
44
|
+
REPORT_KEY_ENUM["DIALER"] = "DIALER";
|
|
44
45
|
REPORT_KEY_ENUM["SALES_COMPARISON"] = "SALES_COMPARISON";
|
|
45
46
|
REPORT_KEY_ENUM["HOURLY_COMPARISON"] = "HOURLY_COMPARISON";
|
|
46
47
|
REPORT_KEY_ENUM["PAYMENTS_COMPARISON"] = "PAYMENTS_COMPARISON";
|
|
@@ -62,6 +63,7 @@ exports.REPORT_ROUTE_SEGMENTS = {
|
|
|
62
63
|
[REPORT_KEY_ENUM.PREP_TIME]: 'prep-time',
|
|
63
64
|
[REPORT_KEY_ENUM.CASH_IN_OUT]: 'cash-in-out',
|
|
64
65
|
[REPORT_KEY_ENUM.DELIVERY]: 'delivery',
|
|
66
|
+
[REPORT_KEY_ENUM.DIALER]: 'dialer',
|
|
65
67
|
[REPORT_KEY_ENUM.SALES_COMPARISON]: 'sales-comparison',
|
|
66
68
|
[REPORT_KEY_ENUM.HOURLY_COMPARISON]: 'hourly-comparison',
|
|
67
69
|
[REPORT_KEY_ENUM.PAYMENTS_COMPARISON]: 'payments-comparison',
|
|
@@ -92,6 +94,7 @@ exports.REPORT_CAPABILITIES = {
|
|
|
92
94
|
[REPORT_KEY_ENUM.PREP_TIME]: { live: true, historical: true, details: true },
|
|
93
95
|
[REPORT_KEY_ENUM.CASH_IN_OUT]: { live: true, historical: true, details: true },
|
|
94
96
|
[REPORT_KEY_ENUM.DELIVERY]: { live: true, historical: true, details: true },
|
|
97
|
+
[REPORT_KEY_ENUM.DIALER]: { live: true, historical: true, details: true },
|
|
95
98
|
[REPORT_KEY_ENUM.HOURLY_COMPARISON]: { live: true, historical: true, details: true },
|
|
96
99
|
[REPORT_KEY_ENUM.PAYMENTS_COMPARISON]: { live: true, historical: true, details: true },
|
|
97
100
|
[REPORT_KEY_ENUM.CREDIT_BILLS]: { live: false, historical: true, details: true },
|
|
@@ -37,6 +37,8 @@ export * from './materialized_tenant_delivery_geo_scopes';
|
|
|
37
37
|
export * from './materialized_tenant_delivery_reports';
|
|
38
38
|
export * from './materialized_tenant_discount_entries';
|
|
39
39
|
export * from './materialized_tenant_discount_reports';
|
|
40
|
+
export * from './materialized_tenant_dialer_entries';
|
|
41
|
+
export * from './materialized_tenant_dialer_reports';
|
|
40
42
|
export * from './materialized_tenant_discount_sources';
|
|
41
43
|
export * from './materialized_tenant_hourly_comparison_entries';
|
|
42
44
|
export * from './materialized_tenant_hourly_comparison_reports';
|
|
@@ -53,6 +53,8 @@ __exportStar(require("./materialized_tenant_delivery_geo_scopes"), exports);
|
|
|
53
53
|
__exportStar(require("./materialized_tenant_delivery_reports"), exports);
|
|
54
54
|
__exportStar(require("./materialized_tenant_discount_entries"), exports);
|
|
55
55
|
__exportStar(require("./materialized_tenant_discount_reports"), exports);
|
|
56
|
+
__exportStar(require("./materialized_tenant_dialer_entries"), exports);
|
|
57
|
+
__exportStar(require("./materialized_tenant_dialer_reports"), exports);
|
|
56
58
|
__exportStar(require("./materialized_tenant_discount_sources"), exports);
|
|
57
59
|
__exportStar(require("./materialized_tenant_hourly_comparison_entries"), exports);
|
|
58
60
|
__exportStar(require("./materialized_tenant_hourly_comparison_reports"), exports);
|
|
@@ -182,4 +182,5 @@ exports.DRILLDOWN_REPORT_TYPE_BY_ENTRY_COLLECTION = {
|
|
|
182
182
|
materialized_tenant_sales_comparison_entries: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_SALES_COMPARISON_ENTRIES,
|
|
183
183
|
materialized_tenant_hourly_comparison_entries: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_HOURLY_COMPARISON_ENTRIES,
|
|
184
184
|
materialized_tenant_payments_comparison_entries: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_PAYMENTS_COMPARISON_ENTRIES,
|
|
185
|
+
materialized_tenant_dialer_entries: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DIALER_ENTRIES,
|
|
185
186
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
/**
|
|
3
|
+
* Mongoose schema for `materialized_tenant_dialer_entries`.
|
|
4
|
+
*
|
|
5
|
+
* PAGE-PARTITIONED by source day, exactly like discounts/delivery entries: the
|
|
6
|
+
* day scope uses `page='all'` and every period entry scope (week / ISO week /
|
|
7
|
+
* month) uses `page=<source localDate>`, so a document is bounded by ONE day's
|
|
8
|
+
* event rows. There is no quarter / semester / year entry document.
|
|
9
|
+
*
|
|
10
|
+
* `dialer_entries` is `Mixed` on purpose: it is a key-addressed map of row
|
|
11
|
+
* sections whose keys are the report's `<ACTION>:<POS_ID>:<STAFF_ID>` grammar.
|
|
12
|
+
*/
|
|
13
|
+
/** Document shape version. Bump with a migration for already-stored pages. */
|
|
14
|
+
export declare const MATERIALIZED_TENANT_DIALER_ENTRIES_SCHEMA_VERSION = 1;
|
|
15
|
+
export declare const MaterializedTenantDialerEntriesSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
16
|
+
timestamps: true;
|
|
17
|
+
versionKey: false;
|
|
18
|
+
minimize: false;
|
|
19
|
+
}, {
|
|
20
|
+
createdAt: NativeDate;
|
|
21
|
+
updatedAt: NativeDate;
|
|
22
|
+
} & {
|
|
23
|
+
createdAt: NativeDate;
|
|
24
|
+
updatedAt: NativeDate;
|
|
25
|
+
brand_id: string;
|
|
26
|
+
tenant_id: string;
|
|
27
|
+
day_index: import("../../constants/ENUMS").DAY_INDEX_ENUM | null;
|
|
28
|
+
iteration: number;
|
|
29
|
+
scope_context: import("../../constants/MATERIALIZED_REPORTS").MATERIALIZED_REPORT_SCOPE_ENUM;
|
|
30
|
+
scope_field: string;
|
|
31
|
+
schema_version: number;
|
|
32
|
+
source_watermark: NativeDate;
|
|
33
|
+
computed_at: NativeDate;
|
|
34
|
+
page: string;
|
|
35
|
+
dialer_entries?: any;
|
|
36
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
37
|
+
createdAt: NativeDate;
|
|
38
|
+
updatedAt: NativeDate;
|
|
39
|
+
} & {
|
|
40
|
+
createdAt: NativeDate;
|
|
41
|
+
updatedAt: NativeDate;
|
|
42
|
+
brand_id: string;
|
|
43
|
+
tenant_id: string;
|
|
44
|
+
day_index: import("../../constants/ENUMS").DAY_INDEX_ENUM | null;
|
|
45
|
+
iteration: number;
|
|
46
|
+
scope_context: import("../../constants/MATERIALIZED_REPORTS").MATERIALIZED_REPORT_SCOPE_ENUM;
|
|
47
|
+
scope_field: string;
|
|
48
|
+
schema_version: number;
|
|
49
|
+
source_watermark: NativeDate;
|
|
50
|
+
computed_at: NativeDate;
|
|
51
|
+
page: string;
|
|
52
|
+
dialer_entries?: any;
|
|
53
|
+
}>> & import("mongoose").FlatRecord<{
|
|
54
|
+
createdAt: NativeDate;
|
|
55
|
+
updatedAt: NativeDate;
|
|
56
|
+
} & {
|
|
57
|
+
createdAt: NativeDate;
|
|
58
|
+
updatedAt: NativeDate;
|
|
59
|
+
brand_id: string;
|
|
60
|
+
tenant_id: string;
|
|
61
|
+
day_index: import("../../constants/ENUMS").DAY_INDEX_ENUM | null;
|
|
62
|
+
iteration: number;
|
|
63
|
+
scope_context: import("../../constants/MATERIALIZED_REPORTS").MATERIALIZED_REPORT_SCOPE_ENUM;
|
|
64
|
+
scope_field: string;
|
|
65
|
+
schema_version: number;
|
|
66
|
+
source_watermark: NativeDate;
|
|
67
|
+
computed_at: NativeDate;
|
|
68
|
+
page: string;
|
|
69
|
+
dialer_entries?: any;
|
|
70
|
+
}> & {
|
|
71
|
+
_id: import("mongoose").Types.ObjectId;
|
|
72
|
+
} & {
|
|
73
|
+
__v: number;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const MATERIALIZED_TENANT_DIALER_ENTRIES_COLLECTION_NAME = "materialized_tenant_dialer_entries";
|
|
76
|
+
/**
|
|
77
|
+
* ONE unique index per PAGE: `tenant_id + scope_context + scope_field + page`.
|
|
78
|
+
*
|
|
79
|
+
* Do NOT use the scope-only index here: every period page carries
|
|
80
|
+
* `day_index: null`, so `(tenant, scope, field, day_index)` would reject the
|
|
81
|
+
* second page of a month. The same key also serves the multi-page read (tenant
|
|
82
|
+
* + scope prefix, then pages).
|
|
83
|
+
*
|
|
84
|
+
* Declared ONLY — applying it is an owner deploy step; nothing calls
|
|
85
|
+
* `ensureIndexes` from a service.
|
|
86
|
+
*/
|
|
87
|
+
export declare const MATERIALIZED_TENANT_DIALER_ENTRIES_COLLECTION_INDEXES: {
|
|
88
|
+
_id: {
|
|
89
|
+
_id: number;
|
|
90
|
+
};
|
|
91
|
+
tenant_id__scope_context__scope_field__page: {
|
|
92
|
+
tenant_id: number;
|
|
93
|
+
scope_context: number;
|
|
94
|
+
scope_field: number;
|
|
95
|
+
page: number;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export declare const MATERIALIZED_TENANT_DIALER_ENTRIES_INDEX_OPTIONS: {
|
|
99
|
+
key: {
|
|
100
|
+
tenant_id: number;
|
|
101
|
+
scope_context: number;
|
|
102
|
+
scope_field: number;
|
|
103
|
+
page: number;
|
|
104
|
+
};
|
|
105
|
+
name: string;
|
|
106
|
+
unique: boolean;
|
|
107
|
+
}[];
|