@harbortouch/skytab-analytics-report-utils 0.4.7 → 0.5.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.
@@ -1,4 +1,4 @@
1
- export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'status';
1
+ export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'salePaymentType' | 'status';
2
2
  export interface ColumnMetadata {
3
3
  titleKey: string;
4
4
  shortTitleKey: string;
package/dist/index.cjs CHANGED
@@ -42,6 +42,7 @@ __export(index_exports, {
42
42
  PRODUCT_MIX_AVAILABLE_COLUMNS: () => PRODUCT_MIX_AVAILABLE_COLUMNS,
43
43
  PRODUCT_MIX_CHART_FIELDS: () => PRODUCT_MIX_CHART_FIELDS,
44
44
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: () => PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
45
+ Report: () => Report,
45
46
  SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
46
47
  SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
47
48
  SALES_SUMMARY_AVAILABLE_COLUMNS: () => SALES_SUMMARY_AVAILABLE_COLUMNS,
@@ -71,6 +72,19 @@ __export(index_exports, {
71
72
  });
72
73
  module.exports = __toCommonJS(index_exports);
73
74
 
75
+ // src/report.ts
76
+ var Report = {
77
+ TICKET_LIVE: "ticket-live",
78
+ TICKET_ANALYTICS: "ticket-analytics",
79
+ SALES_SUMMARY: "sales-summary",
80
+ PRODUCT_MIX: "product-mix",
81
+ MODIFIER_MIX: "modifier-mix",
82
+ ITEM_TAX: "item-tax",
83
+ EMPLOYEE_TIMECARD: "employee-timecard",
84
+ EMPLOYEE_TIP: "employee-tip",
85
+ SALES_BY_ITEM: "sales-by-item"
86
+ };
87
+
74
88
  // src/columns/index.ts
75
89
  var COLUMN_REGISTRY = {
76
90
  fifteenMinInterval: {
@@ -508,6 +522,11 @@ var COLUMN_REGISTRY = {
508
522
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
509
523
  infoTextKey: "common.report-col.shift-duration-hrs.info"
510
524
  },
525
+ salePaymentType: {
526
+ titleKey: "common.report-col.sale-payment-type",
527
+ shortTitleKey: "common.report-col.sale-payment-type.short",
528
+ infoTextKey: "common.report-col.sale-payment-type.info"
529
+ },
511
530
  status: {
512
531
  titleKey: "common.report-col.status",
513
532
  shortTitleKey: "common.report-col.status.short",
@@ -1082,7 +1101,7 @@ var FIELDS4 = {
1082
1101
  discountsAmount: { type: "money", columnKey: "discountAmount" },
1083
1102
  inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1084
1103
  salesAmountNet: { type: "money", columnKey: "netSales" },
1085
- itemsQuantity: { type: "number", columnKey: "quantity" },
1104
+ itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
1086
1105
  avgPrice: {
1087
1106
  type: "fixedNumber",
1088
1107
  columnKey: "averageGrossPrice",
@@ -1502,7 +1521,7 @@ var employeeTimecardConfig = {
1502
1521
 
1503
1522
  // src/reports/salesByItemDetail.ts
1504
1523
  var FIELDS13 = {
1505
- businessDate: { type: "string", columnKey: "date", filteringAvailable: false },
1524
+ businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1506
1525
  ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1507
1526
  hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1508
1527
  daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
@@ -1518,7 +1537,7 @@ var FIELDS13 = {
1518
1537
  guestsCount: { type: "number", columnKey: "guestCount" },
1519
1538
  employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1520
1539
  orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1521
- salesType: { type: "string", columnKey: "transactionType", filteringAvailable: false },
1540
+ salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
1522
1541
  itemPrice: { type: "money", columnKey: "itemPrice" }
1523
1542
  };
1524
1543
  var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
@@ -1571,6 +1590,7 @@ var salesByItemDetailConfig = {
1571
1590
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1572
1591
  PRODUCT_MIX_CHART_FIELDS,
1573
1592
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1593
+ Report,
1574
1594
  SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1575
1595
  SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1576
1596
  SALES_SUMMARY_AVAILABLE_COLUMNS,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type { FieldType, ColumnAlignment, FooterCalculationType, FooterCalculation, ColumnPresentationConfig, ColumnGroupConfig, ReportConfig, } from './types';
2
+ export { type ReportType, Report } from './report';
2
3
  export type { ReportColumnKey, ColumnMetadata } from './columns';
3
4
  export { COLUMN_REGISTRY, getColumnMetadata } from './columns';
4
5
  export { getColumnAlignment, isNumericType } from './utils/alignment';
package/dist/index.js CHANGED
@@ -1,3 +1,16 @@
1
+ // src/report.ts
2
+ var Report = {
3
+ TICKET_LIVE: "ticket-live",
4
+ TICKET_ANALYTICS: "ticket-analytics",
5
+ SALES_SUMMARY: "sales-summary",
6
+ PRODUCT_MIX: "product-mix",
7
+ MODIFIER_MIX: "modifier-mix",
8
+ ITEM_TAX: "item-tax",
9
+ EMPLOYEE_TIMECARD: "employee-timecard",
10
+ EMPLOYEE_TIP: "employee-tip",
11
+ SALES_BY_ITEM: "sales-by-item"
12
+ };
13
+
1
14
  // src/columns/index.ts
2
15
  var COLUMN_REGISTRY = {
3
16
  fifteenMinInterval: {
@@ -435,6 +448,11 @@ var COLUMN_REGISTRY = {
435
448
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
436
449
  infoTextKey: "common.report-col.shift-duration-hrs.info"
437
450
  },
451
+ salePaymentType: {
452
+ titleKey: "common.report-col.sale-payment-type",
453
+ shortTitleKey: "common.report-col.sale-payment-type.short",
454
+ infoTextKey: "common.report-col.sale-payment-type.info"
455
+ },
438
456
  status: {
439
457
  titleKey: "common.report-col.status",
440
458
  shortTitleKey: "common.report-col.status.short",
@@ -1009,7 +1027,7 @@ var FIELDS4 = {
1009
1027
  discountsAmount: { type: "money", columnKey: "discountAmount" },
1010
1028
  inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1011
1029
  salesAmountNet: { type: "money", columnKey: "netSales" },
1012
- itemsQuantity: { type: "number", columnKey: "quantity" },
1030
+ itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
1013
1031
  avgPrice: {
1014
1032
  type: "fixedNumber",
1015
1033
  columnKey: "averageGrossPrice",
@@ -1429,7 +1447,7 @@ var employeeTimecardConfig = {
1429
1447
 
1430
1448
  // src/reports/salesByItemDetail.ts
1431
1449
  var FIELDS13 = {
1432
- businessDate: { type: "string", columnKey: "date", filteringAvailable: false },
1450
+ businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1433
1451
  ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1434
1452
  hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1435
1453
  daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
@@ -1445,7 +1463,7 @@ var FIELDS13 = {
1445
1463
  guestsCount: { type: "number", columnKey: "guestCount" },
1446
1464
  employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1447
1465
  orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1448
- salesType: { type: "string", columnKey: "transactionType", filteringAvailable: false },
1466
+ salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
1449
1467
  itemPrice: { type: "money", columnKey: "itemPrice" }
1450
1468
  };
1451
1469
  var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
@@ -1497,6 +1515,7 @@ export {
1497
1515
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1498
1516
  PRODUCT_MIX_CHART_FIELDS,
1499
1517
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1518
+ Report,
1500
1519
  SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1501
1520
  SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1502
1521
  SALES_SUMMARY_AVAILABLE_COLUMNS,
@@ -0,0 +1,12 @@
1
+ export declare const Report: {
2
+ readonly TICKET_LIVE: "ticket-live";
3
+ readonly TICKET_ANALYTICS: "ticket-analytics";
4
+ readonly SALES_SUMMARY: "sales-summary";
5
+ readonly PRODUCT_MIX: "product-mix";
6
+ readonly MODIFIER_MIX: "modifier-mix";
7
+ readonly ITEM_TAX: "item-tax";
8
+ readonly EMPLOYEE_TIMECARD: "employee-timecard";
9
+ readonly EMPLOYEE_TIP: "employee-tip";
10
+ readonly SALES_BY_ITEM: "sales-by-item";
11
+ };
12
+ export type ReportType = (typeof Report)[keyof typeof Report];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",