bmlt-query-client 1.4.2 → 1.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.5.0] - 2026-09-13
10
+
11
+ ### Added
12
+
13
+ - Virtual-meeting ordering params on `SearchResultsParams`, mirroring the BMLT aggregator's timezone-aware "starting soonest" support: `sort_results_by_next_start` (order by each meeting's next occurrence as an absolute instant), `next_start_grace_minutes` (keep recently-started meetings sorting high), and `target_time_zone` (evaluate weekday/time-of-day filters in the reader's IANA zone). All three are aggregator-mode only and ignored on ordinary root servers.
14
+ - Fluent builder helpers `MeetingQueryBuilder.sortByNextStart(graceMinutes?)` and `.targetTimeZone(tz)`, plus `QuickSearch.virtualSoonest(tz?)` (virtual + hybrid, ordered soonest-first).
15
+
9
16
  ## [1.4.2] - 2026-05-19
10
17
 
11
18
  ### Fixed
package/README.md CHANGED
@@ -183,6 +183,27 @@ const todaysVirtualMeetings = await quickSearch
183
183
  .execute();
184
184
  ```
185
185
 
186
+ ### Virtual Meetings ("starting soonest")
187
+
188
+ On an aggregator (`aggregator_mode_enabled`), the server can order virtual/hybrid
189
+ meetings by whichever starts soonest across every timezone — handy for a
190
+ "what can I join right now?" list. `QuickSearch.virtualSoonest(tz)` wires this up:
191
+
192
+ ```javascript
193
+ const tz = Intl.DateTimeFormat().resolvedOptions().timeZone; // e.g. 'America/New_York'
194
+
195
+ const result = await new QuickSearch(client)
196
+ .virtualSoonest(tz) // venue_types=[2,3] + sort_results_by_next_start + target_time_zone
197
+ .sortByNextStart(15) // optional: keep meetings that started ≤15 min ago near the top
198
+ .executeWithFormats();
199
+ ```
200
+
201
+ These ordering params are **aggregator-mode only** — ordinary root servers ignore
202
+ `sort_results_by_next_start`, `next_start_grace_minutes`, and `target_time_zone`,
203
+ returning the venue-filtered meetings in their usual order. `target_time_zone`
204
+ affects only filtering/ordering; each meeting's `start_time`/`weekday_tinyint`
205
+ still come back in its own local time, so convert client-side for display.
206
+
186
207
  ### Raw Query
187
208
 
188
209
  When you need to pass a BMLT query string exactly as-is — including parameters like `meeting_key_value[]` that match multiple values — use `rawQuery`:
package/dist/app.d.ts CHANGED
@@ -797,6 +797,19 @@ export declare class MeetingQueryBuilder {
797
797
  * Sort by distance (requires geographic search)
798
798
  */
799
799
  sortByDistance(): this;
800
+ /**
801
+ * Order results by each meeting's next upcoming start as an absolute instant
802
+ * ("starting soonest" across timezones). Optionally pass a grace window in
803
+ * minutes so recently-started meetings still sort near the top.
804
+ * Aggregator-mode only — ignored on ordinary root servers.
805
+ */
806
+ sortByNextStart(graceMinutes?: number): this;
807
+ /**
808
+ * Evaluate weekday/time-of-day filters against each meeting's next occurrence
809
+ * in the given IANA time zone (e.g. `'America/New_York'`).
810
+ * Aggregator-mode only — ignored on ordinary root servers.
811
+ */
812
+ targetTimeZone(tz: string): this;
800
813
  /**
801
814
  * Set pagination
802
815
  */
@@ -943,6 +956,14 @@ export declare class QuickSearch {
943
956
  * Search for in-person meetings only
944
957
  */
945
958
  inPerson(): MeetingQueryBuilder;
959
+ /**
960
+ * Find virtual + hybrid meetings ordered by which starts soonest across
961
+ * timezones. Pass the reader's IANA time zone (e.g. from
962
+ * `Intl.DateTimeFormat().resolvedOptions().timeZone`) to reckon any further
963
+ * weekday/time filters in their local zone. Aggregator-mode only — on
964
+ * ordinary root servers the ordering params are ignored.
965
+ */
966
+ virtualSoonest(tz?: string): MeetingQueryBuilder;
946
967
  /**
947
968
  * Search by meeting name or location
948
969
  */
@@ -1026,6 +1047,26 @@ export declare interface SearchResultsParams extends BaseSearchParams {
1026
1047
  geo_width_km?: number;
1027
1048
  /** Sort results by distance when using geographic search */
1028
1049
  sort_results_by_distance?: boolean;
1050
+ /**
1051
+ * Order results by each meeting's next upcoming start as an absolute instant
1052
+ * (timezone-aware "starting soonest"), built for virtual meetings spanning
1053
+ * timezones. Aggregator-mode only — ignored on ordinary root servers.
1054
+ */
1055
+ sort_results_by_next_start?: boolean;
1056
+ /**
1057
+ * Minutes (0–1440) to shift the "now" reference backward when using
1058
+ * {@link sort_results_by_next_start}, so recently-started / in-progress
1059
+ * meetings still sort near the top. Aggregator-mode only.
1060
+ */
1061
+ next_start_grace_minutes?: number;
1062
+ /**
1063
+ * IANA time zone (e.g. `'America/New_York'`) the reader is in. When set, the
1064
+ * `weekdays` and start/end time-of-day filters are evaluated against each
1065
+ * meeting's next occurrence converted into this zone. Aggregator-mode only —
1066
+ * ignored on ordinary root servers. Note: this does not change the returned
1067
+ * `start_time`/`weekday_tinyint`, which remain the meeting's native values.
1068
+ */
1069
+ target_time_zone?: string;
1029
1070
  /** Search for specific field value */
1030
1071
  meeting_key?: string;
1031
1072
  /** The value to search for; pass an array to match any of multiple values */