letsfg 1.4.1 → 1.6.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.
@@ -106,12 +106,6 @@ var ValidationError = class extends LetsFGError {
106
106
  this.name = "ValidationError";
107
107
  }
108
108
  };
109
- var StarRequiredError = class extends LetsFGError {
110
- constructor(message = "GitHub star required. Run: letsfg star --github <your-username>") {
111
- super(message, 403, {}, "STAR_REQUIRED");
112
- this.name = "StarRequiredError";
113
- }
114
- };
115
109
  function routeStr(route) {
116
110
  if (!route.segments.length) return "";
117
111
  const codes = [route.segments[0].origin, ...route.segments.map((s) => s.destination)];
@@ -162,13 +156,8 @@ async function searchLocal(origin, destination, dateFrom, options = {}) {
162
156
  child.on("close", (code) => {
163
157
  try {
164
158
  const data = JSON.parse(stdout);
165
- if (data.error) {
166
- if (data.error.includes("GitHub star required") || data.error.includes("star required")) {
167
- reject(new StarRequiredError(data.error));
168
- } else {
169
- reject(new LetsFGError(data.error));
170
- }
171
- } else resolve(data);
159
+ if (data.error) reject(new LetsFGError(data.error));
160
+ else resolve(data);
172
161
  } catch {
173
162
  reject(new LetsFGError(
174
163
  `Python search failed (code ${code}): ${stdout || stderr}
@@ -402,6 +391,7 @@ var LetsFG = class {
402
391
  "Content-Type": "application/json",
403
392
  "X-API-Key": this.apiKey,
404
393
  "User-Agent": "LetsFG-js/0.1.0",
394
+ "X-Client-Type": "js-sdk",
405
395
  ...init.headers || {}
406
396
  },
407
397
  signal: controller.signal
@@ -470,7 +460,6 @@ export {
470
460
  PaymentRequiredError,
471
461
  OfferExpiredError,
472
462
  ValidationError,
473
- StarRequiredError,
474
463
  offerSummary,
475
464
  cheapestOffer,
476
465
  searchLocal,
package/dist/cli.js CHANGED
@@ -131,12 +131,6 @@ var ValidationError = class extends LetsFGError {
131
131
  this.name = "ValidationError";
132
132
  }
133
133
  };
134
- var StarRequiredError = class extends LetsFGError {
135
- constructor(message = "GitHub star required. Run: letsfg star --github <your-username>") {
136
- super(message, 403, {}, "STAR_REQUIRED");
137
- this.name = "StarRequiredError";
138
- }
139
- };
140
134
  function routeStr(route) {
141
135
  if (!route.segments.length) return "";
142
136
  const codes = [route.segments[0].origin, ...route.segments.map((s) => s.destination)];
@@ -369,6 +363,7 @@ var LetsFG = class {
369
363
  "Content-Type": "application/json",
370
364
  "X-API-Key": this.apiKey,
371
365
  "User-Agent": "LetsFG-js/0.1.0",
366
+ "X-Client-Type": "js-sdk",
372
367
  ...init.headers || {}
373
368
  },
374
369
  signal: controller.signal
@@ -610,44 +605,42 @@ async function cmdRegister(args) {
610
605
  }
611
606
  async function cmdStar(args) {
612
607
  const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
608
+ const apiKey = getFlag(args, "--api-key", "-k");
609
+ const baseUrl = getFlag(args, "--base-url");
613
610
  const github = getFlag(args, "--github", "-g");
614
611
  if (!github) {
615
612
  console.error("Usage: letsfg star --github <your-github-username>");
616
613
  process.exit(1);
617
614
  }
618
- const { spawn } = await import("child_process");
619
- const pythonCmd = process.platform === "win32" ? "python" : "python3";
620
- return new Promise((resolve, reject) => {
621
- const child = spawn(pythonCmd, ["-m", "letsfg.cli", "star", "--github", github], {
622
- stdio: ["inherit", "pipe", "pipe"]
623
- });
624
- let stdout = "";
625
- let stderr = "";
626
- child.stdout.on("data", (d) => {
627
- stdout += d.toString();
628
- });
629
- child.stderr.on("data", (d) => {
630
- stderr += d.toString();
631
- });
632
- child.on("close", (code) => {
633
- if (jsonOut) {
634
- const verified = code === 0;
635
- console.log(JSON.stringify({ status: verified ? "verified" : "star_required", github_username: github }));
636
- } else {
637
- if (stdout) console.log(stdout);
638
- if (stderr && code !== 0) console.error(stderr);
639
- }
640
- if (code !== 0) {
641
- process.exit(1);
642
- }
643
- resolve();
644
- });
645
- child.on("error", (err) => {
646
- console.error(`Cannot start Python: ${err.message}`);
647
- console.error("Install: pip install letsfg");
648
- process.exit(1);
649
- });
650
- });
615
+ const bt = new LetsFG({ apiKey, baseUrl });
616
+ const result = await bt.linkGithub(github);
617
+ if (jsonOut) {
618
+ console.log(JSON.stringify(result, null, 2));
619
+ return;
620
+ }
621
+ const status = result.status;
622
+ if (status === "verified") {
623
+ console.log(`
624
+ \u2713 GitHub star verified! Unlimited access granted.`);
625
+ console.log(` Username: ${result.github_username}`);
626
+ console.log(`
627
+ You're all set \u2014 search, unlock, and book for free.
628
+ `);
629
+ } else if (status === "already_verified") {
630
+ console.log(`
631
+ \u2713 Already verified! You have unlimited access.`);
632
+ console.log(` Username: ${result.github_username}
633
+ `);
634
+ } else if (status === "star_required") {
635
+ console.log(`
636
+ \u2717 Star not found for '${github}'.`);
637
+ console.log(` 1. Star the repo: https://github.com/LetsFG/LetsFG`);
638
+ console.log(` 2. Run this command again.
639
+ `);
640
+ } else {
641
+ console.error(` \u2717 Unexpected status: ${status}`);
642
+ process.exit(1);
643
+ }
651
644
  }
652
645
  async function cmdSetupPayment(args) {
653
646
  const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
@@ -705,19 +698,16 @@ var HELP = `
705
698
  LetsFG \u2014 Agent-native flight search & booking.
706
699
 
707
700
  Search 400+ airlines at raw airline prices \u2014 $20-50 cheaper than OTAs.
708
-
709
- **GitHub Star Required!**
710
- Before using, you must:
711
- 1. Star https://github.com/LetsFG/LetsFG
712
- 2. Run: letsfg star --github <your-username>
701
+ 100% FREE \u2014 just star our GitHub repo for unlimited access.
713
702
 
714
703
  Commands:
715
- star --github <username> Verify GitHub star (required first!)
716
- search <origin> <dest> <date> Search for flights (FREE with star)
704
+ search <origin> <dest> <date> Search for flights (FREE)
717
705
  locations <query> Resolve city name to IATA codes
718
- unlock <offer_id> Unlock offer (hosted mode only)
719
- book <offer_id> --passenger ... Book flight
706
+ star --github <username> Link GitHub \u2014 star repo for free access
707
+ unlock <offer_id> Unlock offer (FREE with GitHub star)
708
+ book <offer_id> --passenger ... Book flight (FREE after unlock)
720
709
  register --name ... --email ... Register new agent
710
+ setup-payment Legacy payment setup
721
711
  me Show agent profile
722
712
 
723
713
  Options:
@@ -726,6 +716,7 @@ Options:
726
716
  --base-url API URL (default: https://api.letsfg.co)
727
717
 
728
718
  Examples:
719
+ letsfg register --name my-agent --email me@example.com
729
720
  letsfg star --github octocat
730
721
  letsfg search GDN BER 2026-03-03 --sort price
731
722
  letsfg unlock off_xxx
@@ -772,17 +763,6 @@ async function main() {
772
763
  process.exit(1);
773
764
  }
774
765
  } catch (e) {
775
- if (e instanceof StarRequiredError) {
776
- console.error(`
777
- \u2B50 GitHub star required to use LetsFG!
778
- `);
779
- console.error(` 1. Star the repo: https://github.com/LetsFG/LetsFG`);
780
- console.error(` 2. Run: letsfg star --github <your-username>
781
- `);
782
- console.error(` This is completely FREE \u2014 just a star to help us grow!
783
- `);
784
- process.exit(1);
785
- }
786
766
  if (e instanceof LetsFGError) {
787
767
  console.error(`Error: ${e.message}`);
788
768
  process.exit(1);
package/dist/cli.mjs CHANGED
@@ -2,9 +2,8 @@
2
2
  import {
3
3
  LetsFG,
4
4
  LetsFGError,
5
- StarRequiredError,
6
5
  offerSummary
7
- } from "./chunk-7LYR3CHE.mjs";
6
+ } from "./chunk-GXEB2JO2.mjs";
8
7
 
9
8
  // src/cli.ts
10
9
  function getFlag(args, flag, alias) {
@@ -226,44 +225,42 @@ async function cmdRegister(args) {
226
225
  }
227
226
  async function cmdStar(args) {
228
227
  const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
228
+ const apiKey = getFlag(args, "--api-key", "-k");
229
+ const baseUrl = getFlag(args, "--base-url");
229
230
  const github = getFlag(args, "--github", "-g");
230
231
  if (!github) {
231
232
  console.error("Usage: letsfg star --github <your-github-username>");
232
233
  process.exit(1);
233
234
  }
234
- const { spawn } = await import("child_process");
235
- const pythonCmd = process.platform === "win32" ? "python" : "python3";
236
- return new Promise((resolve, reject) => {
237
- const child = spawn(pythonCmd, ["-m", "letsfg.cli", "star", "--github", github], {
238
- stdio: ["inherit", "pipe", "pipe"]
239
- });
240
- let stdout = "";
241
- let stderr = "";
242
- child.stdout.on("data", (d) => {
243
- stdout += d.toString();
244
- });
245
- child.stderr.on("data", (d) => {
246
- stderr += d.toString();
247
- });
248
- child.on("close", (code) => {
249
- if (jsonOut) {
250
- const verified = code === 0;
251
- console.log(JSON.stringify({ status: verified ? "verified" : "star_required", github_username: github }));
252
- } else {
253
- if (stdout) console.log(stdout);
254
- if (stderr && code !== 0) console.error(stderr);
255
- }
256
- if (code !== 0) {
257
- process.exit(1);
258
- }
259
- resolve();
260
- });
261
- child.on("error", (err) => {
262
- console.error(`Cannot start Python: ${err.message}`);
263
- console.error("Install: pip install letsfg");
264
- process.exit(1);
265
- });
266
- });
235
+ const bt = new LetsFG({ apiKey, baseUrl });
236
+ const result = await bt.linkGithub(github);
237
+ if (jsonOut) {
238
+ console.log(JSON.stringify(result, null, 2));
239
+ return;
240
+ }
241
+ const status = result.status;
242
+ if (status === "verified") {
243
+ console.log(`
244
+ \u2713 GitHub star verified! Unlimited access granted.`);
245
+ console.log(` Username: ${result.github_username}`);
246
+ console.log(`
247
+ You're all set \u2014 search, unlock, and book for free.
248
+ `);
249
+ } else if (status === "already_verified") {
250
+ console.log(`
251
+ \u2713 Already verified! You have unlimited access.`);
252
+ console.log(` Username: ${result.github_username}
253
+ `);
254
+ } else if (status === "star_required") {
255
+ console.log(`
256
+ \u2717 Star not found for '${github}'.`);
257
+ console.log(` 1. Star the repo: https://github.com/LetsFG/LetsFG`);
258
+ console.log(` 2. Run this command again.
259
+ `);
260
+ } else {
261
+ console.error(` \u2717 Unexpected status: ${status}`);
262
+ process.exit(1);
263
+ }
267
264
  }
268
265
  async function cmdSetupPayment(args) {
269
266
  const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
@@ -321,19 +318,16 @@ var HELP = `
321
318
  LetsFG \u2014 Agent-native flight search & booking.
322
319
 
323
320
  Search 400+ airlines at raw airline prices \u2014 $20-50 cheaper than OTAs.
324
-
325
- **GitHub Star Required!**
326
- Before using, you must:
327
- 1. Star https://github.com/LetsFG/LetsFG
328
- 2. Run: letsfg star --github <your-username>
321
+ 100% FREE \u2014 just star our GitHub repo for unlimited access.
329
322
 
330
323
  Commands:
331
- star --github <username> Verify GitHub star (required first!)
332
- search <origin> <dest> <date> Search for flights (FREE with star)
324
+ search <origin> <dest> <date> Search for flights (FREE)
333
325
  locations <query> Resolve city name to IATA codes
334
- unlock <offer_id> Unlock offer (hosted mode only)
335
- book <offer_id> --passenger ... Book flight
326
+ star --github <username> Link GitHub \u2014 star repo for free access
327
+ unlock <offer_id> Unlock offer (FREE with GitHub star)
328
+ book <offer_id> --passenger ... Book flight (FREE after unlock)
336
329
  register --name ... --email ... Register new agent
330
+ setup-payment Legacy payment setup
337
331
  me Show agent profile
338
332
 
339
333
  Options:
@@ -342,6 +336,7 @@ Options:
342
336
  --base-url API URL (default: https://api.letsfg.co)
343
337
 
344
338
  Examples:
339
+ letsfg register --name my-agent --email me@example.com
345
340
  letsfg star --github octocat
346
341
  letsfg search GDN BER 2026-03-03 --sort price
347
342
  letsfg unlock off_xxx
@@ -388,17 +383,6 @@ async function main() {
388
383
  process.exit(1);
389
384
  }
390
385
  } catch (e) {
391
- if (e instanceof StarRequiredError) {
392
- console.error(`
393
- \u2B50 GitHub star required to use LetsFG!
394
- `);
395
- console.error(` 1. Star the repo: https://github.com/LetsFG/LetsFG`);
396
- console.error(` 2. Run: letsfg star --github <your-username>
397
- `);
398
- console.error(` This is completely FREE \u2014 just a star to help us grow!
399
- `);
400
- process.exit(1);
401
- }
402
386
  if (e instanceof LetsFGError) {
403
387
  console.error(`Error: ${e.message}`);
404
388
  process.exit(1);
package/dist/index.d.mts CHANGED
@@ -1,19 +1,14 @@
1
1
  /**
2
2
  * LetsFG — Agent-native flight search & booking SDK for Node.js/TypeScript.
3
3
  *
4
- * 195 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
4
+ * 75 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
5
5
  * Zero external JS dependencies. Uses native fetch (Node 18+).
6
6
  *
7
- * **GitHub Star Required!**
8
- * Before using, you must:
9
- * 1. Star https://github.com/LetsFG/LetsFG
10
- * 2. Run: letsfg star --github <your-username>
11
- *
12
7
  * @example
13
8
  * ```ts
14
9
  * import { LetsFG, searchLocal } from 'letsfg';
15
10
  *
16
- * // Local search — FREE with GitHub star
11
+ * // Local search — FREE, no API key
17
12
  * const local = await searchLocal('SHA', 'CTU', '2026-03-20');
18
13
  *
19
14
  * // Full API — search + unlock + book
@@ -188,25 +183,12 @@ declare class OfferExpiredError extends LetsFGError {
188
183
  declare class ValidationError extends LetsFGError {
189
184
  constructor(message: string, statusCode?: number, response?: Record<string, unknown>, errorCode?: string);
190
185
  }
191
- /**
192
- * Thrown when GitHub star verification is required.
193
- * Users must star https://github.com/LetsFG/LetsFG and run:
194
- * letsfg star --github <username>
195
- */
196
- declare class StarRequiredError extends LetsFGError {
197
- constructor(message?: string);
198
- }
199
186
  /** One-line offer summary */
200
187
  declare function offerSummary(offer: FlightOffer): string;
201
188
  /** Get cheapest offer from search results */
202
189
  declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
203
190
  /**
204
- * Search flights using 195 local airline connectors — FREE with GitHub star!
205
- *
206
- * **GitHub Star Required!**
207
- * Before using, you must:
208
- * 1. Star https://github.com/LetsFG/LetsFG
209
- * 2. Run: letsfg star --github <your-username>
191
+ * Search flights using 73 local airline connectors — FREE, no API key needed.
210
192
  *
211
193
  * Requires: pip install letsfg && playwright install chromium
212
194
  *
@@ -214,7 +196,6 @@ declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
214
196
  * @param destination - IATA code (e.g., "CTU")
215
197
  * @param dateFrom - Departure date "YYYY-MM-DD"
216
198
  * @param options - Optional: currency, adults, limit, etc.
217
- * @throws {StarRequiredError} If GitHub star not verified
218
199
  */
219
200
  declare function searchLocal(origin: string, destination: string, dateFrom: string, options?: Partial<SearchOptions>): Promise<FlightSearchResult>;
220
201
  declare class LetsFG {
@@ -301,4 +282,4 @@ declare const BoostedTravel: typeof LetsFG;
301
282
  declare const BoostedTravelError: typeof LetsFGError;
302
283
  type BoostedTravelConfig = LetsFGConfig;
303
284
 
304
- export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, LetsFG, type LetsFGConfig, LetsFGError, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, StarRequiredError, type UnlockResult, ValidationError, cheapestOffer, LetsFG as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
285
+ export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, LetsFG, type LetsFGConfig, LetsFGError, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, LetsFG as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
package/dist/index.d.ts CHANGED
@@ -1,19 +1,14 @@
1
1
  /**
2
2
  * LetsFG — Agent-native flight search & booking SDK for Node.js/TypeScript.
3
3
  *
4
- * 195 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
4
+ * 75 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
5
5
  * Zero external JS dependencies. Uses native fetch (Node 18+).
6
6
  *
7
- * **GitHub Star Required!**
8
- * Before using, you must:
9
- * 1. Star https://github.com/LetsFG/LetsFG
10
- * 2. Run: letsfg star --github <your-username>
11
- *
12
7
  * @example
13
8
  * ```ts
14
9
  * import { LetsFG, searchLocal } from 'letsfg';
15
10
  *
16
- * // Local search — FREE with GitHub star
11
+ * // Local search — FREE, no API key
17
12
  * const local = await searchLocal('SHA', 'CTU', '2026-03-20');
18
13
  *
19
14
  * // Full API — search + unlock + book
@@ -188,25 +183,12 @@ declare class OfferExpiredError extends LetsFGError {
188
183
  declare class ValidationError extends LetsFGError {
189
184
  constructor(message: string, statusCode?: number, response?: Record<string, unknown>, errorCode?: string);
190
185
  }
191
- /**
192
- * Thrown when GitHub star verification is required.
193
- * Users must star https://github.com/LetsFG/LetsFG and run:
194
- * letsfg star --github <username>
195
- */
196
- declare class StarRequiredError extends LetsFGError {
197
- constructor(message?: string);
198
- }
199
186
  /** One-line offer summary */
200
187
  declare function offerSummary(offer: FlightOffer): string;
201
188
  /** Get cheapest offer from search results */
202
189
  declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
203
190
  /**
204
- * Search flights using 195 local airline connectors — FREE with GitHub star!
205
- *
206
- * **GitHub Star Required!**
207
- * Before using, you must:
208
- * 1. Star https://github.com/LetsFG/LetsFG
209
- * 2. Run: letsfg star --github <your-username>
191
+ * Search flights using 73 local airline connectors — FREE, no API key needed.
210
192
  *
211
193
  * Requires: pip install letsfg && playwright install chromium
212
194
  *
@@ -214,7 +196,6 @@ declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
214
196
  * @param destination - IATA code (e.g., "CTU")
215
197
  * @param dateFrom - Departure date "YYYY-MM-DD"
216
198
  * @param options - Optional: currency, adults, limit, etc.
217
- * @throws {StarRequiredError} If GitHub star not verified
218
199
  */
219
200
  declare function searchLocal(origin: string, destination: string, dateFrom: string, options?: Partial<SearchOptions>): Promise<FlightSearchResult>;
220
201
  declare class LetsFG {
@@ -301,4 +282,4 @@ declare const BoostedTravel: typeof LetsFG;
301
282
  declare const BoostedTravelError: typeof LetsFGError;
302
283
  type BoostedTravelConfig = LetsFGConfig;
303
284
 
304
- export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, LetsFG, type LetsFGConfig, LetsFGError, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, StarRequiredError, type UnlockResult, ValidationError, cheapestOffer, LetsFG as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
285
+ export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, LetsFG, type LetsFGConfig, LetsFGError, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, LetsFG as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
package/dist/index.js CHANGED
@@ -39,7 +39,6 @@ __export(index_exports, {
39
39
  LetsFGError: () => LetsFGError,
40
40
  OfferExpiredError: () => OfferExpiredError,
41
41
  PaymentRequiredError: () => PaymentRequiredError,
42
- StarRequiredError: () => StarRequiredError,
43
42
  ValidationError: () => ValidationError,
44
43
  cheapestOffer: () => cheapestOffer,
45
44
  default: () => index_default,
@@ -157,12 +156,6 @@ var ValidationError = class extends LetsFGError {
157
156
  this.name = "ValidationError";
158
157
  }
159
158
  };
160
- var StarRequiredError = class extends LetsFGError {
161
- constructor(message = "GitHub star required. Run: letsfg star --github <your-username>") {
162
- super(message, 403, {}, "STAR_REQUIRED");
163
- this.name = "StarRequiredError";
164
- }
165
- };
166
159
  function routeStr(route) {
167
160
  if (!route.segments.length) return "";
168
161
  const codes = [route.segments[0].origin, ...route.segments.map((s) => s.destination)];
@@ -213,13 +206,8 @@ async function searchLocal(origin, destination, dateFrom, options = {}) {
213
206
  child.on("close", (code) => {
214
207
  try {
215
208
  const data = JSON.parse(stdout);
216
- if (data.error) {
217
- if (data.error.includes("GitHub star required") || data.error.includes("star required")) {
218
- reject(new StarRequiredError(data.error));
219
- } else {
220
- reject(new LetsFGError(data.error));
221
- }
222
- } else resolve(data);
209
+ if (data.error) reject(new LetsFGError(data.error));
210
+ else resolve(data);
223
211
  } catch {
224
212
  reject(new LetsFGError(
225
213
  `Python search failed (code ${code}): ${stdout || stderr}
@@ -453,6 +441,7 @@ var LetsFG = class {
453
441
  "Content-Type": "application/json",
454
442
  "X-API-Key": this.apiKey,
455
443
  "User-Agent": "LetsFG-js/0.1.0",
444
+ "X-Client-Type": "js-sdk",
456
445
  ...init.headers || {}
457
446
  },
458
447
  signal: controller.signal
@@ -523,7 +512,6 @@ var BoostedTravelError = LetsFGError;
523
512
  LetsFGError,
524
513
  OfferExpiredError,
525
514
  PaymentRequiredError,
526
- StarRequiredError,
527
515
  ValidationError,
528
516
  cheapestOffer,
529
517
  getSystemInfo,
package/dist/index.mjs CHANGED
@@ -8,14 +8,13 @@ import {
8
8
  LetsFGError,
9
9
  OfferExpiredError,
10
10
  PaymentRequiredError,
11
- StarRequiredError,
12
11
  ValidationError,
13
12
  cheapestOffer,
14
13
  index_default,
15
14
  offerSummary,
16
15
  searchLocal,
17
16
  systemInfo
18
- } from "./chunk-7LYR3CHE.mjs";
17
+ } from "./chunk-GXEB2JO2.mjs";
19
18
  export {
20
19
  AuthenticationError,
21
20
  BoostedTravel,
@@ -26,7 +25,6 @@ export {
26
25
  LetsFGError,
27
26
  OfferExpiredError,
28
27
  PaymentRequiredError,
29
- StarRequiredError,
30
28
  ValidationError,
31
29
  cheapestOffer,
32
30
  index_default as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "letsfg",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "description": "Agent-native flight search & booking. 195 airline connectors run locally + enterprise GDS/NDC APIs. Built for autonomous AI agents.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",