@harbortouch/skytab-analytics-report-utils 0.10.0 → 0.12.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/dist/index.d.cts CHANGED
@@ -1219,6 +1219,8 @@ interface ReportConfig<TField extends string = string> {
1219
1219
  availableColumns: TField[];
1220
1220
  defaultVisibleColumns: TField[];
1221
1221
  columnGroups?: ColumnGroupConfig[];
1222
+ chartFields?: TField[];
1223
+ hasFooter: boolean;
1222
1224
  }
1223
1225
 
1224
1226
  declare const Report: {
@@ -1233,6 +1235,7 @@ declare const Report: {
1233
1235
  readonly SALES_BY_ITEM: "sales-by-item";
1234
1236
  readonly DAILY_SALES: "daily-sales";
1235
1237
  readonly DAILY_SALES_LIVE: "daily-sales-live";
1238
+ readonly DAILY_SALES_TRENDS: "daily-sales-trends";
1236
1239
  };
1237
1240
  type ReportType = (typeof Report)[keyof typeof Report];
1238
1241
  declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
@@ -1248,73 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
1248
1251
  declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
1249
1252
 
1250
1253
  type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
1251
- declare const SALES_SUMMARY_AVAILABLE_COLUMNS: SalesSummaryField[];
1252
- declare const SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS: SalesSummaryField[];
1253
- declare const salesSummaryConfig: ReportConfig<SalesSummaryField>;
1254
+ declare const salesSummaryConfig: {
1255
+ readonly fields: Record<SalesSummaryField, ColumnPresentationConfig<SalesSummaryField>>;
1256
+ readonly availableColumns: SalesSummaryField[];
1257
+ readonly defaultVisibleColumns: SalesSummaryField[];
1258
+ readonly columnGroups: ColumnGroupConfig[];
1259
+ readonly hasFooter: true;
1260
+ };
1254
1261
 
1255
1262
  type TicketSummaryField = 'ticketId' | 'locationId' | 'orderName' | 'revenueCenterName' | 'daypartName' | 'inclusiveTaxesAmount' | 'locationName' | 'orderNumber' | 'businessDate' | 'ticketOpenedAt' | 'ticketClosedAt' | 'ticketTime' | 'ticketSubtotal' | 'discountsAmount' | 'surchargesAmount' | 'taxesAmount' | 'ticketGrandTotal' | 'gratuitiesAmount' | 'tipAmount' | 'paymentsAmount' | 'paymentTypeName' | 'guestsCount' | 'employeeName' | 'orderTypeName';
1256
- declare const TICKET_SUMMARY_AVAILABLE_COLUMNS: TicketSummaryField[];
1257
- declare const TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS: TicketSummaryField[];
1258
- declare const ticketSummaryConfig: ReportConfig<TicketSummaryField>;
1263
+ declare const ticketSummaryConfig: {
1264
+ readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
1265
+ readonly availableColumns: TicketSummaryField[];
1266
+ readonly defaultVisibleColumns: TicketSummaryField[];
1267
+ readonly hasFooter: true;
1268
+ };
1259
1269
 
1260
1270
  type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
1261
- declare const TICKET_LIVE_AVAILABLE_COLUMNS: TicketLiveField[];
1262
- declare const TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS: TicketLiveField[];
1263
- declare const ticketLiveConfig: ReportConfig<TicketLiveField>;
1271
+ declare const ticketLiveConfig: {
1272
+ readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
1273
+ readonly availableColumns: TicketLiveField[];
1274
+ readonly defaultVisibleColumns: TicketLiveField[];
1275
+ readonly hasFooter: true;
1276
+ };
1264
1277
 
1265
1278
  type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
1266
- declare const PRODUCT_MIX_AVAILABLE_COLUMNS: ProductMixField[];
1267
- declare const PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: ProductMixField[];
1268
- declare const PRODUCT_MIX_CHART_FIELDS: ProductMixField[];
1269
- declare const productMixConfig: ReportConfig<ProductMixField>;
1279
+ declare const productMixConfig: {
1280
+ readonly fields: Record<ProductMixField, ColumnPresentationConfig<ProductMixField>>;
1281
+ readonly availableColumns: ProductMixField[];
1282
+ readonly defaultVisibleColumns: ProductMixField[];
1283
+ readonly chartFields: ProductMixField[];
1284
+ readonly hasFooter: true;
1285
+ };
1270
1286
 
1271
1287
  type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
1272
- declare const MODIFIER_MIX_AVAILABLE_COLUMNS: ModifierMixField[];
1273
- declare const MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS: ModifierMixField[];
1274
- declare const modifierMixConfig: ReportConfig<ModifierMixField>;
1288
+ declare const modifierMixConfig: {
1289
+ readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
1290
+ readonly availableColumns: ModifierMixField[];
1291
+ readonly defaultVisibleColumns: ModifierMixField[];
1292
+ readonly hasFooter: true;
1293
+ };
1275
1294
 
1276
1295
  type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
1277
- declare const ITEM_TAX_AVAILABLE_COLUMNS: ItemTaxField[];
1278
- declare const ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: ItemTaxField[];
1279
- declare const itemTaxConfig: ReportConfig<ItemTaxField>;
1296
+ declare const itemTaxConfig: {
1297
+ readonly fields: Record<ItemTaxField, ColumnPresentationConfig<ItemTaxField>>;
1298
+ readonly availableColumns: ItemTaxField[];
1299
+ readonly defaultVisibleColumns: ItemTaxField[];
1300
+ readonly hasFooter: false;
1301
+ };
1302
+
1303
+ type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct';
1304
+ declare const dailySalesConfig: {
1305
+ readonly fields: Record<DailySalesField, ColumnPresentationConfig<DailySalesField>>;
1306
+ readonly availableColumns: DailySalesField[];
1307
+ readonly defaultVisibleColumns: DailySalesField[];
1308
+ readonly hasFooter: true;
1309
+ };
1280
1310
 
1281
- type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice' | 'ticketsCount' | 'guestsCount' | 'ticketAverage' | 'guestAverage' | 'ticketAvg' | 'guestAvg';
1282
- declare const DAILY_SALES_AVAILABLE_COLUMNS: DailySalesField[];
1283
- declare const DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: DailySalesField[];
1284
- declare const DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: DailySalesField[];
1285
- declare const dailySalesConfig: ReportConfig<DailySalesField>;
1286
- declare const DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: DailySalesField[];
1287
- declare const dailySalesTrendsConfig: ReportConfig<DailySalesField>;
1311
+ type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
1312
+ declare const dailySalesLiveConfig: {
1313
+ readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
1314
+ readonly availableColumns: DailySalesLiveField[];
1315
+ readonly defaultVisibleColumns: DailySalesLiveField[];
1316
+ readonly hasFooter: true;
1317
+ };
1288
1318
 
1289
1319
  type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
1290
- declare const DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS: DailySalesPaymentsField[];
1291
- declare const DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS: DailySalesPaymentsField[];
1292
- declare const dailySalesPaymentsConfig: ReportConfig<DailySalesPaymentsField>;
1320
+ declare const dailySalesPaymentsConfig: {
1321
+ readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
1322
+ readonly availableColumns: DailySalesPaymentsField[];
1323
+ readonly defaultVisibleColumns: DailySalesPaymentsField[];
1324
+ readonly hasFooter: true;
1325
+ };
1293
1326
 
1294
1327
  type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
1295
- declare const DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: DailySalesDiscountsField[];
1296
- declare const DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: DailySalesDiscountsField[];
1297
- declare const dailySalesDiscountsConfig: ReportConfig<DailySalesDiscountsField>;
1328
+ declare const dailySalesDiscountsConfig: {
1329
+ readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
1330
+ readonly availableColumns: DailySalesDiscountsField[];
1331
+ readonly defaultVisibleColumns: DailySalesDiscountsField[];
1332
+ readonly hasFooter: true;
1333
+ };
1298
1334
 
1299
1335
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
1300
- declare const DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS: DailySalesRefundsVoidsField[];
1301
- declare const DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: DailySalesRefundsVoidsField[];
1302
- declare const dailySalesRefundsVoidsConfig: ReportConfig<DailySalesRefundsVoidsField>;
1336
+ declare const dailySalesRefundsVoidsConfig: {
1337
+ readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
1338
+ readonly availableColumns: DailySalesRefundsVoidsField[];
1339
+ readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
1340
+ readonly hasFooter: true;
1341
+ };
1303
1342
 
1304
1343
  type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
1305
- declare const DAILY_SALES_TAXES_AVAILABLE_COLUMNS: DailySalesTaxesField[];
1306
- declare const DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: DailySalesTaxesField[];
1307
- declare const dailySalesTaxesConfig: ReportConfig<DailySalesTaxesField>;
1344
+ declare const dailySalesTaxesConfig: {
1345
+ readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
1346
+ readonly availableColumns: DailySalesTaxesField[];
1347
+ readonly defaultVisibleColumns: DailySalesTaxesField[];
1348
+ readonly hasFooter: true;
1349
+ };
1308
1350
 
1309
1351
  type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
1310
- declare const EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS: EmployeeTimecardField[];
1311
- declare const EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS: EmployeeTimecardField[];
1312
- declare const employeeTimecardConfig: ReportConfig<EmployeeTimecardField>;
1352
+ declare const employeeTimecardConfig: {
1353
+ readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
1354
+ readonly availableColumns: EmployeeTimecardField[];
1355
+ readonly defaultVisibleColumns: EmployeeTimecardField[];
1356
+ readonly hasFooter: true;
1357
+ };
1313
1358
 
1314
1359
  type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
1315
- declare const SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: SalesByItemDetailField[];
1316
- declare const SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: SalesByItemDetailField[];
1317
- declare const salesByItemDetailConfig: ReportConfig<SalesByItemDetailField>;
1360
+ declare const salesByItemDetailConfig: {
1361
+ readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
1362
+ readonly availableColumns: SalesByItemDetailField[];
1363
+ readonly defaultVisibleColumns: SalesByItemDetailField[];
1364
+ readonly hasFooter: false;
1365
+ };
1366
+
1367
+ type DailySalesTrendsField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'ticketsCount' | 'guestsCount' | 'ticketAvg' | 'guestAvg';
1368
+ declare const dailySalesTrendsConfig: {
1369
+ readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
1370
+ readonly availableColumns: DailySalesTrendsField[];
1371
+ readonly defaultVisibleColumns: DailySalesTrendsField[];
1372
+ readonly hasFooter: true;
1373
+ };
1318
1374
 
1319
1375
  type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
1320
1376
  interface LocaleOption {
@@ -1357,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1357
1413
  }[]) => LocaleOption[];
1358
1414
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1359
1415
 
1360
- export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS, type LocaleOption, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, Report, type ReportColumnKey, type ReportConfig, type ReportType, SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS, SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS, SALES_SUMMARY_AVAILABLE_COLUMNS, SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS, TICKET_SUMMARY_AVAILABLE_COLUMNS, TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
1416
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
package/dist/index.d.ts CHANGED
@@ -1219,6 +1219,8 @@ interface ReportConfig<TField extends string = string> {
1219
1219
  availableColumns: TField[];
1220
1220
  defaultVisibleColumns: TField[];
1221
1221
  columnGroups?: ColumnGroupConfig[];
1222
+ chartFields?: TField[];
1223
+ hasFooter: boolean;
1222
1224
  }
1223
1225
 
1224
1226
  declare const Report: {
@@ -1233,6 +1235,7 @@ declare const Report: {
1233
1235
  readonly SALES_BY_ITEM: "sales-by-item";
1234
1236
  readonly DAILY_SALES: "daily-sales";
1235
1237
  readonly DAILY_SALES_LIVE: "daily-sales-live";
1238
+ readonly DAILY_SALES_TRENDS: "daily-sales-trends";
1236
1239
  };
1237
1240
  type ReportType = (typeof Report)[keyof typeof Report];
1238
1241
  declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
@@ -1248,73 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
1248
1251
  declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
1249
1252
 
1250
1253
  type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
1251
- declare const SALES_SUMMARY_AVAILABLE_COLUMNS: SalesSummaryField[];
1252
- declare const SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS: SalesSummaryField[];
1253
- declare const salesSummaryConfig: ReportConfig<SalesSummaryField>;
1254
+ declare const salesSummaryConfig: {
1255
+ readonly fields: Record<SalesSummaryField, ColumnPresentationConfig<SalesSummaryField>>;
1256
+ readonly availableColumns: SalesSummaryField[];
1257
+ readonly defaultVisibleColumns: SalesSummaryField[];
1258
+ readonly columnGroups: ColumnGroupConfig[];
1259
+ readonly hasFooter: true;
1260
+ };
1254
1261
 
1255
1262
  type TicketSummaryField = 'ticketId' | 'locationId' | 'orderName' | 'revenueCenterName' | 'daypartName' | 'inclusiveTaxesAmount' | 'locationName' | 'orderNumber' | 'businessDate' | 'ticketOpenedAt' | 'ticketClosedAt' | 'ticketTime' | 'ticketSubtotal' | 'discountsAmount' | 'surchargesAmount' | 'taxesAmount' | 'ticketGrandTotal' | 'gratuitiesAmount' | 'tipAmount' | 'paymentsAmount' | 'paymentTypeName' | 'guestsCount' | 'employeeName' | 'orderTypeName';
1256
- declare const TICKET_SUMMARY_AVAILABLE_COLUMNS: TicketSummaryField[];
1257
- declare const TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS: TicketSummaryField[];
1258
- declare const ticketSummaryConfig: ReportConfig<TicketSummaryField>;
1263
+ declare const ticketSummaryConfig: {
1264
+ readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
1265
+ readonly availableColumns: TicketSummaryField[];
1266
+ readonly defaultVisibleColumns: TicketSummaryField[];
1267
+ readonly hasFooter: true;
1268
+ };
1259
1269
 
1260
1270
  type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
1261
- declare const TICKET_LIVE_AVAILABLE_COLUMNS: TicketLiveField[];
1262
- declare const TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS: TicketLiveField[];
1263
- declare const ticketLiveConfig: ReportConfig<TicketLiveField>;
1271
+ declare const ticketLiveConfig: {
1272
+ readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
1273
+ readonly availableColumns: TicketLiveField[];
1274
+ readonly defaultVisibleColumns: TicketLiveField[];
1275
+ readonly hasFooter: true;
1276
+ };
1264
1277
 
1265
1278
  type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
1266
- declare const PRODUCT_MIX_AVAILABLE_COLUMNS: ProductMixField[];
1267
- declare const PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: ProductMixField[];
1268
- declare const PRODUCT_MIX_CHART_FIELDS: ProductMixField[];
1269
- declare const productMixConfig: ReportConfig<ProductMixField>;
1279
+ declare const productMixConfig: {
1280
+ readonly fields: Record<ProductMixField, ColumnPresentationConfig<ProductMixField>>;
1281
+ readonly availableColumns: ProductMixField[];
1282
+ readonly defaultVisibleColumns: ProductMixField[];
1283
+ readonly chartFields: ProductMixField[];
1284
+ readonly hasFooter: true;
1285
+ };
1270
1286
 
1271
1287
  type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
1272
- declare const MODIFIER_MIX_AVAILABLE_COLUMNS: ModifierMixField[];
1273
- declare const MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS: ModifierMixField[];
1274
- declare const modifierMixConfig: ReportConfig<ModifierMixField>;
1288
+ declare const modifierMixConfig: {
1289
+ readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
1290
+ readonly availableColumns: ModifierMixField[];
1291
+ readonly defaultVisibleColumns: ModifierMixField[];
1292
+ readonly hasFooter: true;
1293
+ };
1275
1294
 
1276
1295
  type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
1277
- declare const ITEM_TAX_AVAILABLE_COLUMNS: ItemTaxField[];
1278
- declare const ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: ItemTaxField[];
1279
- declare const itemTaxConfig: ReportConfig<ItemTaxField>;
1296
+ declare const itemTaxConfig: {
1297
+ readonly fields: Record<ItemTaxField, ColumnPresentationConfig<ItemTaxField>>;
1298
+ readonly availableColumns: ItemTaxField[];
1299
+ readonly defaultVisibleColumns: ItemTaxField[];
1300
+ readonly hasFooter: false;
1301
+ };
1302
+
1303
+ type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct';
1304
+ declare const dailySalesConfig: {
1305
+ readonly fields: Record<DailySalesField, ColumnPresentationConfig<DailySalesField>>;
1306
+ readonly availableColumns: DailySalesField[];
1307
+ readonly defaultVisibleColumns: DailySalesField[];
1308
+ readonly hasFooter: true;
1309
+ };
1280
1310
 
1281
- type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice' | 'ticketsCount' | 'guestsCount' | 'ticketAverage' | 'guestAverage' | 'ticketAvg' | 'guestAvg';
1282
- declare const DAILY_SALES_AVAILABLE_COLUMNS: DailySalesField[];
1283
- declare const DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: DailySalesField[];
1284
- declare const DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: DailySalesField[];
1285
- declare const dailySalesConfig: ReportConfig<DailySalesField>;
1286
- declare const DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: DailySalesField[];
1287
- declare const dailySalesTrendsConfig: ReportConfig<DailySalesField>;
1311
+ type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
1312
+ declare const dailySalesLiveConfig: {
1313
+ readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
1314
+ readonly availableColumns: DailySalesLiveField[];
1315
+ readonly defaultVisibleColumns: DailySalesLiveField[];
1316
+ readonly hasFooter: true;
1317
+ };
1288
1318
 
1289
1319
  type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
1290
- declare const DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS: DailySalesPaymentsField[];
1291
- declare const DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS: DailySalesPaymentsField[];
1292
- declare const dailySalesPaymentsConfig: ReportConfig<DailySalesPaymentsField>;
1320
+ declare const dailySalesPaymentsConfig: {
1321
+ readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
1322
+ readonly availableColumns: DailySalesPaymentsField[];
1323
+ readonly defaultVisibleColumns: DailySalesPaymentsField[];
1324
+ readonly hasFooter: true;
1325
+ };
1293
1326
 
1294
1327
  type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
1295
- declare const DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: DailySalesDiscountsField[];
1296
- declare const DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: DailySalesDiscountsField[];
1297
- declare const dailySalesDiscountsConfig: ReportConfig<DailySalesDiscountsField>;
1328
+ declare const dailySalesDiscountsConfig: {
1329
+ readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
1330
+ readonly availableColumns: DailySalesDiscountsField[];
1331
+ readonly defaultVisibleColumns: DailySalesDiscountsField[];
1332
+ readonly hasFooter: true;
1333
+ };
1298
1334
 
1299
1335
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
1300
- declare const DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS: DailySalesRefundsVoidsField[];
1301
- declare const DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: DailySalesRefundsVoidsField[];
1302
- declare const dailySalesRefundsVoidsConfig: ReportConfig<DailySalesRefundsVoidsField>;
1336
+ declare const dailySalesRefundsVoidsConfig: {
1337
+ readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
1338
+ readonly availableColumns: DailySalesRefundsVoidsField[];
1339
+ readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
1340
+ readonly hasFooter: true;
1341
+ };
1303
1342
 
1304
1343
  type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
1305
- declare const DAILY_SALES_TAXES_AVAILABLE_COLUMNS: DailySalesTaxesField[];
1306
- declare const DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: DailySalesTaxesField[];
1307
- declare const dailySalesTaxesConfig: ReportConfig<DailySalesTaxesField>;
1344
+ declare const dailySalesTaxesConfig: {
1345
+ readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
1346
+ readonly availableColumns: DailySalesTaxesField[];
1347
+ readonly defaultVisibleColumns: DailySalesTaxesField[];
1348
+ readonly hasFooter: true;
1349
+ };
1308
1350
 
1309
1351
  type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
1310
- declare const EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS: EmployeeTimecardField[];
1311
- declare const EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS: EmployeeTimecardField[];
1312
- declare const employeeTimecardConfig: ReportConfig<EmployeeTimecardField>;
1352
+ declare const employeeTimecardConfig: {
1353
+ readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
1354
+ readonly availableColumns: EmployeeTimecardField[];
1355
+ readonly defaultVisibleColumns: EmployeeTimecardField[];
1356
+ readonly hasFooter: true;
1357
+ };
1313
1358
 
1314
1359
  type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
1315
- declare const SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: SalesByItemDetailField[];
1316
- declare const SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: SalesByItemDetailField[];
1317
- declare const salesByItemDetailConfig: ReportConfig<SalesByItemDetailField>;
1360
+ declare const salesByItemDetailConfig: {
1361
+ readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
1362
+ readonly availableColumns: SalesByItemDetailField[];
1363
+ readonly defaultVisibleColumns: SalesByItemDetailField[];
1364
+ readonly hasFooter: false;
1365
+ };
1366
+
1367
+ type DailySalesTrendsField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'ticketsCount' | 'guestsCount' | 'ticketAvg' | 'guestAvg';
1368
+ declare const dailySalesTrendsConfig: {
1369
+ readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
1370
+ readonly availableColumns: DailySalesTrendsField[];
1371
+ readonly defaultVisibleColumns: DailySalesTrendsField[];
1372
+ readonly hasFooter: true;
1373
+ };
1318
1374
 
1319
1375
  type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
1320
1376
  interface LocaleOption {
@@ -1357,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1357
1413
  }[]) => LocaleOption[];
1358
1414
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1359
1415
 
1360
- export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS, type LocaleOption, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, Report, type ReportColumnKey, type ReportConfig, type ReportType, SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS, SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS, SALES_SUMMARY_AVAILABLE_COLUMNS, SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS, TICKET_SUMMARY_AVAILABLE_COLUMNS, TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
1416
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };