bmlt-query-client 1.0.6 → 1.0.8
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/PROJECT_SUMMARY.md +1 -1
- package/README.md +7 -7
- package/dist/app.d.ts +41 -14
- package/dist/app.js +223 -193
- package/dist/app.js.map +1 -1
- package/package.json +4 -4
package/PROJECT_SUMMARY.md
CHANGED
|
@@ -87,7 +87,7 @@ import { BmltClient, Weekday, VenueType } from 'bmlt-query-client';
|
|
|
87
87
|
|
|
88
88
|
// Initialize client with NYC demo server
|
|
89
89
|
const client = new BmltClient({
|
|
90
|
-
|
|
90
|
+
serverURL: 'https://latest.aws.bmlt.app/main_server',
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
// Search by address with automatic geocoding
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ The easiest way to use the BMLT Query Client in the browser is via ES modules:
|
|
|
38
38
|
|
|
39
39
|
// Initialize the client
|
|
40
40
|
const client = new BmltClient({
|
|
41
|
-
|
|
41
|
+
serverURL: 'https://latest.aws.bmlt.app/main_server', // NYC demo server
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
// Search for virtual meetings
|
|
@@ -72,7 +72,7 @@ npm install bmlt-query-client
|
|
|
72
72
|
import { BmltClient, VenueType, MeetingQueryBuilder } from 'bmlt-query-client';
|
|
73
73
|
|
|
74
74
|
const client = new BmltClient({
|
|
75
|
-
|
|
75
|
+
serverURL: 'https://your-bmlt-server.org/main_server',
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
// Search for meetings
|
|
@@ -253,9 +253,9 @@ console.log(client.getUserAgent()); // 'my-updated-app/2.0.0'
|
|
|
253
253
|
client.setTimeout(60000); // 60 seconds
|
|
254
254
|
console.log(client.getTimeout()); // 60000
|
|
255
255
|
|
|
256
|
-
// Update
|
|
257
|
-
client.
|
|
258
|
-
console.log(client.
|
|
256
|
+
// Update server URL
|
|
257
|
+
client.setServerURL('https://new-server.org/main_server');
|
|
258
|
+
console.log(client.getServerURL());
|
|
259
259
|
|
|
260
260
|
// Update default data format
|
|
261
261
|
client.setDefaultFormat(BmltDataFormat.JSONP);
|
|
@@ -266,7 +266,7 @@ console.log(client.getDefaultFormat());
|
|
|
266
266
|
|
|
267
267
|
```javascript
|
|
268
268
|
const client = new BmltClient({
|
|
269
|
-
|
|
269
|
+
serverURL: 'https://your-server.org/main_server', // Required
|
|
270
270
|
defaultFormat: BmltDataFormat.JSON, // Optional
|
|
271
271
|
timeout: 30000, // 30 seconds
|
|
272
272
|
userAgent: 'my-app/1.0.0', // Custom user agent
|
|
@@ -283,7 +283,7 @@ const client = new BmltClient({
|
|
|
283
283
|
|
|
284
284
|
```javascript
|
|
285
285
|
const client = new BmltClient({
|
|
286
|
-
|
|
286
|
+
serverURL: 'https://your-server.org/main_server',
|
|
287
287
|
geocodingOptions: {
|
|
288
288
|
countryCode: 'us', // ISO country code bias
|
|
289
289
|
viewbox: [-74.2, 40.4, -73.7, 40.9], // Geographic bounding box [w,s,e,n]
|
package/dist/app.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class BmltClient {
|
|
|
11
11
|
private timeout;
|
|
12
12
|
private userAgent;
|
|
13
13
|
private readonly geocodingService?;
|
|
14
|
-
private
|
|
14
|
+
private serverURL;
|
|
15
15
|
private defaultFormat;
|
|
16
16
|
constructor(options: BmltClientOptions);
|
|
17
17
|
/**
|
|
@@ -22,6 +22,16 @@ export declare class BmltClient {
|
|
|
22
22
|
* Search for meetings
|
|
23
23
|
*/
|
|
24
24
|
searchMeetings(params?: SearchResultsParams): Promise<Meeting[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Search for meetings and return both meetings and the formats they reference in a
|
|
27
|
+
* single request. Uses get_used_formats=true so the server wraps the response as
|
|
28
|
+
* { meetings: Meeting[], formats: Format[] } instead of a bare Meeting[].
|
|
29
|
+
*
|
|
30
|
+
* This replaces the common pattern of Promise.all([getFormats(), searchMeetings()])
|
|
31
|
+
* with a single round-trip, which matters for large servers where getFormats() can
|
|
32
|
+
* return hundreds of unused format records.
|
|
33
|
+
*/
|
|
34
|
+
searchMeetingsWithFormats(params?: Omit<SearchResultsParams, 'get_used_formats' | 'get_formats_only'>): Promise<MeetingsWithFormats>;
|
|
25
35
|
/**
|
|
26
36
|
* Search for meetings by geographic location using geocoding
|
|
27
37
|
*/
|
|
@@ -71,13 +81,13 @@ export declare class BmltClient {
|
|
|
71
81
|
*/
|
|
72
82
|
reverseGeocode(coordinates: Coordinates, options?: Partial<GeocodeOptions>): Promise<GeocodeResult>;
|
|
73
83
|
/**
|
|
74
|
-
* Get the
|
|
84
|
+
* Get the server URL
|
|
75
85
|
*/
|
|
76
|
-
|
|
86
|
+
getServerURL(): string;
|
|
77
87
|
/**
|
|
78
|
-
* Update the
|
|
88
|
+
* Update the server URL
|
|
79
89
|
*/
|
|
80
|
-
|
|
90
|
+
setServerURL(url: string): void;
|
|
81
91
|
/**
|
|
82
92
|
* Get the default data format
|
|
83
93
|
*/
|
|
@@ -116,8 +126,8 @@ export declare class BmltClient {
|
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
export declare interface BmltClientOptions {
|
|
119
|
-
/**
|
|
120
|
-
|
|
129
|
+
/** Server URL */
|
|
130
|
+
serverURL: string;
|
|
121
131
|
/** Default data format */
|
|
122
132
|
defaultFormat?: BmltDataFormat;
|
|
123
133
|
/** HTTP request timeout in milliseconds */
|
|
@@ -703,9 +713,9 @@ export declare class MeetingQueryBuilder {
|
|
|
703
713
|
*/
|
|
704
714
|
formatsOnly(): this;
|
|
705
715
|
/**
|
|
706
|
-
* Filter by
|
|
716
|
+
* Filter by server IDs (aggregator mode)
|
|
707
717
|
*/
|
|
708
|
-
|
|
718
|
+
serverIds(serverIds: number | number[], exclude?: boolean): this;
|
|
709
719
|
/**
|
|
710
720
|
* Get the current query parameters
|
|
711
721
|
*/
|
|
@@ -722,12 +732,29 @@ export declare class MeetingQueryBuilder {
|
|
|
722
732
|
* Execute the search and return results
|
|
723
733
|
*/
|
|
724
734
|
execute(): Promise<Meeting[]>;
|
|
735
|
+
/**
|
|
736
|
+
* Execute the search and return both meetings and the formats they reference
|
|
737
|
+
* in a single request. Equivalent to execute() but avoids a separate getFormats() call.
|
|
738
|
+
*/
|
|
739
|
+
executeWithFormats(): Promise<MeetingsWithFormats>;
|
|
725
740
|
/**
|
|
726
741
|
* Execute the search by geocoding an address first
|
|
727
742
|
*/
|
|
728
743
|
executeNearAddress(address: string, radiusMiles?: number, radiusKm?: number, sortByDistance?: boolean): Promise<Meeting[]>;
|
|
729
744
|
}
|
|
730
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Combined response when get_used_formats=true is passed to GetSearchResults.
|
|
748
|
+
* The BMLT API wraps the response in an object with separate meetings and formats arrays
|
|
749
|
+
* instead of returning a bare meetings array.
|
|
750
|
+
*/
|
|
751
|
+
export declare interface MeetingsWithFormats {
|
|
752
|
+
/** Meetings matching the search criteria */
|
|
753
|
+
meetings: Meeting[];
|
|
754
|
+
/** Only the formats actually referenced by the returned meetings */
|
|
755
|
+
formats: Format[];
|
|
756
|
+
}
|
|
757
|
+
|
|
731
758
|
/**
|
|
732
759
|
* Convert miles to kilometers
|
|
733
760
|
*/
|
|
@@ -900,8 +927,8 @@ export declare interface SearchResultsParams extends BaseSearchParams {
|
|
|
900
927
|
page_num?: number;
|
|
901
928
|
/** Published status: undefined=published only, 0=all, -1=unpublished only */
|
|
902
929
|
advanced_published?: 0 | -1;
|
|
903
|
-
/** Include specific
|
|
904
|
-
|
|
930
|
+
/** Include specific server IDs (for aggregator mode) */
|
|
931
|
+
server_ids?: number | number[];
|
|
905
932
|
}
|
|
906
933
|
|
|
907
934
|
export declare interface ServerInfo {
|
|
@@ -962,7 +989,7 @@ export declare enum SortKey {
|
|
|
962
989
|
}
|
|
963
990
|
|
|
964
991
|
export declare interface URLBuilderOptions {
|
|
965
|
-
|
|
992
|
+
serverURL: string;
|
|
966
993
|
format: BmltDataFormat;
|
|
967
994
|
endpoint: BmltEndpoint;
|
|
968
995
|
parameters?: Record<string, unknown>;
|
|
@@ -984,9 +1011,9 @@ export declare function validateEndpointFormat(endpoint: BmltEndpoint, format: B
|
|
|
984
1011
|
export declare function validateRadius(radius: number): void;
|
|
985
1012
|
|
|
986
1013
|
/**
|
|
987
|
-
* Clean and validate a
|
|
1014
|
+
* Clean and validate a server URL
|
|
988
1015
|
*/
|
|
989
|
-
export declare function
|
|
1016
|
+
export declare function validateServerURL(url: string): string;
|
|
990
1017
|
|
|
991
1018
|
export declare enum VenueType {
|
|
992
1019
|
IN_PERSON = 1,
|