busroot-sdk 0.0.8-dev.2695058487 → 0.0.8-dev.2695893749

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +18 -22
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -891,28 +891,25 @@ var require_times = __commonJS({
891
891
  rangeCode: "RELATIVE_DAYS_28",
892
892
  label: "Last 4 Weeks",
893
893
  durationMs: time_1.TimeIntervals["7d"].ms * 4
894
- }
894
+ },
895
895
  // Calendar-month rolling windows. These use `months` (not `durationMs`) so the
896
896
  // window start is computed with moment.subtract(N, "month") — respecting real
897
897
  // month lengths and leap years rather than a fixed number of days.
898
- // Temporarily disabled (with the matching dropdown gate in
899
- // apps/core/lib/helper/ranges.ts) — RELATIVE_MONTHS_* codes are rejected while
900
- // commented out.
901
- // {
902
- // rangeCode: "RELATIVE_MONTHS_3",
903
- // label: "Last 3 Months",
904
- // months: 3,
905
- // },
906
- // {
907
- // rangeCode: "RELATIVE_MONTHS_6",
908
- // label: "Last 6 Months",
909
- // months: 6,
910
- // },
911
- // {
912
- // rangeCode: "RELATIVE_MONTHS_12",
913
- // label: "Last 12 Months",
914
- // months: 12,
915
- // },
898
+ {
899
+ rangeCode: "RELATIVE_MONTHS_3",
900
+ label: "Last 3 Months",
901
+ months: 3
902
+ },
903
+ {
904
+ rangeCode: "RELATIVE_MONTHS_6",
905
+ label: "Last 6 Months",
906
+ months: 6
907
+ },
908
+ {
909
+ rangeCode: "RELATIVE_MONTHS_12",
910
+ label: "Last 12 Months",
911
+ months: 12
912
+ }
916
913
  ];
917
914
  var AllowedAggregationWindows = [
918
915
  // 1 Hour
@@ -1576,9 +1573,8 @@ var require_times = __commonJS({
1576
1573
  return moment_timezone_1.default.duration(startMoment.diff(endMoment)).humanize(true);
1577
1574
  };
1578
1575
  exports2.getDurationAsHumanize = getDurationAsHumanize;
1579
- function generateTimeWindows(startAt, windowDuration, count, limitAt) {
1580
- const diffToMultiple = startAt % windowDuration;
1581
- const correctedStartAt = startAt - diffToMultiple;
1576
+ function generateTimeWindows(startAt, windowDuration, count, limitAt, alignStartToWindowGrid = true) {
1577
+ const correctedStartAt = alignStartToWindowGrid ? startAt - startAt % windowDuration : startAt;
1582
1578
  const windows = [];
1583
1579
  let endAtTimestamp = 0;
1584
1580
  for (let i = 0; i < count; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busroot-sdk",
3
- "version": "0.0.8-dev.2695058487",
3
+ "version": "0.0.8-dev.2695893749",
4
4
  "description": "An SDK for accessing Busroot from output.industries",
5
5
  "homepage": "https://www.output.industries",
6
6
  "main": "./build/index.js",