letsfg 1.0.2 → 1.0.4
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/dist/{chunk-LKAF7U4R.mjs → chunk-ES56QTBU.mjs} +13 -3
- package/dist/cli.js +75 -11
- package/dist/cli.mjs +63 -9
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +13 -3
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -230,7 +230,7 @@ var LetsFG = class {
|
|
|
230
230
|
return data ? [data] : [];
|
|
231
231
|
}
|
|
232
232
|
/**
|
|
233
|
-
* Unlock a flight offer —
|
|
233
|
+
* Unlock a flight offer — FREE with GitHub star.
|
|
234
234
|
* Confirms price, reserves for 30 minutes.
|
|
235
235
|
*/
|
|
236
236
|
async unlock(offerId) {
|
|
@@ -256,7 +256,7 @@ var LetsFG = class {
|
|
|
256
256
|
return this.post("/api/v1/bookings/book", body);
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
|
-
* Set up payment method (
|
|
259
|
+
* Set up payment method (legacy — use linkGithub instead).
|
|
260
260
|
*/
|
|
261
261
|
async setupPayment(token = "tok_visa") {
|
|
262
262
|
this.requireApiKey();
|
|
@@ -265,7 +265,7 @@ var LetsFG = class {
|
|
|
265
265
|
/**
|
|
266
266
|
* Start automated checkout — drives to payment page, NEVER submits payment.
|
|
267
267
|
*
|
|
268
|
-
* Requires unlock first
|
|
268
|
+
* Requires unlock first. Returns progress with screenshot and
|
|
269
269
|
* booking URL for manual completion.
|
|
270
270
|
*
|
|
271
271
|
* @param offerId - Offer ID from search results
|
|
@@ -328,6 +328,16 @@ var LetsFG = class {
|
|
|
328
328
|
child.stdin.end();
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Link GitHub account for FREE unlimited access.
|
|
333
|
+
*
|
|
334
|
+
* Star https://github.com/LetsFG/LetsFG, then call this with your username.
|
|
335
|
+
* Once verified, access is permanent.
|
|
336
|
+
*/
|
|
337
|
+
async linkGithub(githubUsername) {
|
|
338
|
+
this.requireApiKey();
|
|
339
|
+
return this.post(`/api/v1/agents/link-github?github_username=${encodeURIComponent(githubUsername)}`, {});
|
|
340
|
+
}
|
|
331
341
|
/**
|
|
332
342
|
* Get current agent profile and usage stats.
|
|
333
343
|
*/
|
package/dist/cli.js
CHANGED
|
@@ -202,7 +202,7 @@ var LetsFG = class {
|
|
|
202
202
|
return data ? [data] : [];
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
|
-
* Unlock a flight offer —
|
|
205
|
+
* Unlock a flight offer — FREE with GitHub star.
|
|
206
206
|
* Confirms price, reserves for 30 minutes.
|
|
207
207
|
*/
|
|
208
208
|
async unlock(offerId) {
|
|
@@ -228,7 +228,7 @@ var LetsFG = class {
|
|
|
228
228
|
return this.post("/api/v1/bookings/book", body);
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
|
-
* Set up payment method (
|
|
231
|
+
* Set up payment method (legacy — use linkGithub instead).
|
|
232
232
|
*/
|
|
233
233
|
async setupPayment(token = "tok_visa") {
|
|
234
234
|
this.requireApiKey();
|
|
@@ -237,7 +237,7 @@ var LetsFG = class {
|
|
|
237
237
|
/**
|
|
238
238
|
* Start automated checkout — drives to payment page, NEVER submits payment.
|
|
239
239
|
*
|
|
240
|
-
* Requires unlock first
|
|
240
|
+
* Requires unlock first. Returns progress with screenshot and
|
|
241
241
|
* booking URL for manual completion.
|
|
242
242
|
*
|
|
243
243
|
* @param offerId - Offer ID from search results
|
|
@@ -300,6 +300,16 @@ var LetsFG = class {
|
|
|
300
300
|
child.stdin.end();
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Link GitHub account for FREE unlimited access.
|
|
305
|
+
*
|
|
306
|
+
* Star https://github.com/LetsFG/LetsFG, then call this with your username.
|
|
307
|
+
* Once verified, access is permanent.
|
|
308
|
+
*/
|
|
309
|
+
async linkGithub(githubUsername) {
|
|
310
|
+
this.requireApiKey();
|
|
311
|
+
return this.post(`/api/v1/agents/link-github?github_username=${encodeURIComponent(githubUsername)}`, {});
|
|
312
|
+
}
|
|
303
313
|
/**
|
|
304
314
|
* Get current agent profile and usage stats.
|
|
305
315
|
*/
|
|
@@ -493,7 +503,6 @@ async function cmdUnlock(args) {
|
|
|
493
503
|
\u2713 Offer unlocked!`);
|
|
494
504
|
console.log(` Confirmed price: ${result.confirmed_currency} ${result.confirmed_price?.toFixed(2)}`);
|
|
495
505
|
console.log(` Expires at: ${result.offer_expires_at}`);
|
|
496
|
-
console.log(` $1 unlock fee charged`);
|
|
497
506
|
console.log(`
|
|
498
507
|
Next: letsfg book ${offerId} --passenger '{...}' --email you@example.com
|
|
499
508
|
`);
|
|
@@ -588,9 +597,50 @@ async function cmdRegister(args) {
|
|
|
588
597
|
Save your API key:`);
|
|
589
598
|
console.log(` export LETSFG_API_KEY=${result.api_key}`);
|
|
590
599
|
console.log(`
|
|
591
|
-
Next:
|
|
600
|
+
Next: Star the repo and link your GitHub:`);
|
|
601
|
+
console.log(` 1. Star https://github.com/LetsFG/LetsFG`);
|
|
602
|
+
console.log(` 2. letsfg star --github <your-github-username>
|
|
592
603
|
`);
|
|
593
604
|
}
|
|
605
|
+
async function cmdStar(args) {
|
|
606
|
+
const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
|
|
607
|
+
const apiKey = getFlag(args, "--api-key", "-k");
|
|
608
|
+
const baseUrl = getFlag(args, "--base-url");
|
|
609
|
+
const github = getFlag(args, "--github", "-g");
|
|
610
|
+
if (!github) {
|
|
611
|
+
console.error("Usage: letsfg star --github <your-github-username>");
|
|
612
|
+
process.exit(1);
|
|
613
|
+
}
|
|
614
|
+
const bt = new LetsFG({ apiKey, baseUrl });
|
|
615
|
+
const result = await bt.linkGithub(github);
|
|
616
|
+
if (jsonOut) {
|
|
617
|
+
console.log(JSON.stringify(result, null, 2));
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
const status = result.status;
|
|
621
|
+
if (status === "verified") {
|
|
622
|
+
console.log(`
|
|
623
|
+
\u2713 GitHub star verified! Unlimited access granted.`);
|
|
624
|
+
console.log(` Username: ${result.github_username}`);
|
|
625
|
+
console.log(`
|
|
626
|
+
You're all set \u2014 search, unlock, and book for free.
|
|
627
|
+
`);
|
|
628
|
+
} else if (status === "already_verified") {
|
|
629
|
+
console.log(`
|
|
630
|
+
\u2713 Already verified! You have unlimited access.`);
|
|
631
|
+
console.log(` Username: ${result.github_username}
|
|
632
|
+
`);
|
|
633
|
+
} else if (status === "star_required") {
|
|
634
|
+
console.log(`
|
|
635
|
+
\u2717 Star not found for '${github}'.`);
|
|
636
|
+
console.log(` 1. Star the repo: https://github.com/LetsFG/LetsFG`);
|
|
637
|
+
console.log(` 2. Run this command again.
|
|
638
|
+
`);
|
|
639
|
+
} else {
|
|
640
|
+
console.error(` \u2717 Unexpected status: ${status}`);
|
|
641
|
+
process.exit(1);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
594
644
|
async function cmdSetupPayment(args) {
|
|
595
645
|
const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
|
|
596
646
|
const apiKey = getFlag(args, "--api-key", "-k");
|
|
@@ -627,7 +677,16 @@ async function cmdMe(args) {
|
|
|
627
677
|
Agent: ${p.agent_name} (${p.agent_id})`);
|
|
628
678
|
console.log(` Email: ${p.email}`);
|
|
629
679
|
console.log(` Tier: ${p.tier}`);
|
|
630
|
-
|
|
680
|
+
const gh = p.github_username || "";
|
|
681
|
+
const starOk = p.github_star_verified || false;
|
|
682
|
+
if (starOk) {
|
|
683
|
+
console.log(` GitHub: \u2713 ${gh} (star verified \u2014 unlimited access)`);
|
|
684
|
+
} else if (gh) {
|
|
685
|
+
console.log(` GitHub: ${gh} (star not verified)`);
|
|
686
|
+
} else {
|
|
687
|
+
console.log(` GitHub: Not linked \u2014 run: letsfg star --github <username>`);
|
|
688
|
+
}
|
|
689
|
+
console.log(` Payment: ${p.payment_ready ? "\u2713 Ready" : "\u2014"}`);
|
|
631
690
|
console.log(` Searches: ${u.total_searches || 0}`);
|
|
632
691
|
console.log(` Unlocks: ${u.total_unlocks || 0}`);
|
|
633
692
|
console.log(` Bookings: ${u.total_bookings || 0}`);
|
|
@@ -638,15 +697,16 @@ var HELP = `
|
|
|
638
697
|
LetsFG \u2014 Agent-native flight search & booking.
|
|
639
698
|
|
|
640
699
|
Search 400+ airlines at raw airline prices \u2014 $20-50 cheaper than OTAs.
|
|
641
|
-
|
|
700
|
+
100% FREE \u2014 just star our GitHub repo for unlimited access.
|
|
642
701
|
|
|
643
702
|
Commands:
|
|
644
703
|
search <origin> <dest> <date> Search for flights (FREE)
|
|
645
704
|
locations <query> Resolve city name to IATA codes
|
|
646
|
-
|
|
705
|
+
star --github <username> Link GitHub \u2014 star repo for free access
|
|
706
|
+
unlock <offer_id> Unlock offer (FREE with GitHub star)
|
|
647
707
|
book <offer_id> --passenger ... Book flight (FREE after unlock)
|
|
648
708
|
register --name ... --email ... Register new agent
|
|
649
|
-
setup-payment
|
|
709
|
+
setup-payment Legacy payment setup
|
|
650
710
|
me Show agent profile
|
|
651
711
|
|
|
652
712
|
Options:
|
|
@@ -655,10 +715,11 @@ Options:
|
|
|
655
715
|
--base-url API URL (default: https://api.letsfg.co)
|
|
656
716
|
|
|
657
717
|
Examples:
|
|
718
|
+
letsfg register --name my-agent --email me@example.com
|
|
719
|
+
letsfg star --github octocat
|
|
658
720
|
letsfg search GDN BER 2026-03-03 --sort price
|
|
659
|
-
letsfg search LON BCN 2026-04-01 --return 2026-04-08 --json
|
|
660
721
|
letsfg unlock off_xxx
|
|
661
|
-
letsfg book off_xxx -p '{"id":"pas_xxx"
|
|
722
|
+
letsfg book off_xxx -p '{"id":"pas_xxx",...}' -e john@ex.com
|
|
662
723
|
`;
|
|
663
724
|
async function main() {
|
|
664
725
|
const args = process.argv.slice(2);
|
|
@@ -680,6 +741,9 @@ async function main() {
|
|
|
680
741
|
case "register":
|
|
681
742
|
await cmdRegister(args);
|
|
682
743
|
break;
|
|
744
|
+
case "star":
|
|
745
|
+
await cmdStar(args);
|
|
746
|
+
break;
|
|
683
747
|
case "setup-payment":
|
|
684
748
|
await cmdSetupPayment(args);
|
|
685
749
|
break;
|
package/dist/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LetsFG,
|
|
4
4
|
LetsFGError,
|
|
5
5
|
offerSummary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ES56QTBU.mjs";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
function getFlag(args, flag, alias) {
|
|
@@ -124,7 +124,6 @@ async function cmdUnlock(args) {
|
|
|
124
124
|
\u2713 Offer unlocked!`);
|
|
125
125
|
console.log(` Confirmed price: ${result.confirmed_currency} ${result.confirmed_price?.toFixed(2)}`);
|
|
126
126
|
console.log(` Expires at: ${result.offer_expires_at}`);
|
|
127
|
-
console.log(` $1 unlock fee charged`);
|
|
128
127
|
console.log(`
|
|
129
128
|
Next: letsfg book ${offerId} --passenger '{...}' --email you@example.com
|
|
130
129
|
`);
|
|
@@ -219,9 +218,50 @@ async function cmdRegister(args) {
|
|
|
219
218
|
Save your API key:`);
|
|
220
219
|
console.log(` export LETSFG_API_KEY=${result.api_key}`);
|
|
221
220
|
console.log(`
|
|
222
|
-
Next:
|
|
221
|
+
Next: Star the repo and link your GitHub:`);
|
|
222
|
+
console.log(` 1. Star https://github.com/LetsFG/LetsFG`);
|
|
223
|
+
console.log(` 2. letsfg star --github <your-github-username>
|
|
223
224
|
`);
|
|
224
225
|
}
|
|
226
|
+
async function cmdStar(args) {
|
|
227
|
+
const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
|
|
228
|
+
const apiKey = getFlag(args, "--api-key", "-k");
|
|
229
|
+
const baseUrl = getFlag(args, "--base-url");
|
|
230
|
+
const github = getFlag(args, "--github", "-g");
|
|
231
|
+
if (!github) {
|
|
232
|
+
console.error("Usage: letsfg star --github <your-github-username>");
|
|
233
|
+
process.exit(1);
|
|
234
|
+
}
|
|
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
|
+
}
|
|
264
|
+
}
|
|
225
265
|
async function cmdSetupPayment(args) {
|
|
226
266
|
const jsonOut = hasFlag(args, "--json") || hasFlag(args, "-j");
|
|
227
267
|
const apiKey = getFlag(args, "--api-key", "-k");
|
|
@@ -258,7 +298,16 @@ async function cmdMe(args) {
|
|
|
258
298
|
Agent: ${p.agent_name} (${p.agent_id})`);
|
|
259
299
|
console.log(` Email: ${p.email}`);
|
|
260
300
|
console.log(` Tier: ${p.tier}`);
|
|
261
|
-
|
|
301
|
+
const gh = p.github_username || "";
|
|
302
|
+
const starOk = p.github_star_verified || false;
|
|
303
|
+
if (starOk) {
|
|
304
|
+
console.log(` GitHub: \u2713 ${gh} (star verified \u2014 unlimited access)`);
|
|
305
|
+
} else if (gh) {
|
|
306
|
+
console.log(` GitHub: ${gh} (star not verified)`);
|
|
307
|
+
} else {
|
|
308
|
+
console.log(` GitHub: Not linked \u2014 run: letsfg star --github <username>`);
|
|
309
|
+
}
|
|
310
|
+
console.log(` Payment: ${p.payment_ready ? "\u2713 Ready" : "\u2014"}`);
|
|
262
311
|
console.log(` Searches: ${u.total_searches || 0}`);
|
|
263
312
|
console.log(` Unlocks: ${u.total_unlocks || 0}`);
|
|
264
313
|
console.log(` Bookings: ${u.total_bookings || 0}`);
|
|
@@ -269,15 +318,16 @@ var HELP = `
|
|
|
269
318
|
LetsFG \u2014 Agent-native flight search & booking.
|
|
270
319
|
|
|
271
320
|
Search 400+ airlines at raw airline prices \u2014 $20-50 cheaper than OTAs.
|
|
272
|
-
|
|
321
|
+
100% FREE \u2014 just star our GitHub repo for unlimited access.
|
|
273
322
|
|
|
274
323
|
Commands:
|
|
275
324
|
search <origin> <dest> <date> Search for flights (FREE)
|
|
276
325
|
locations <query> Resolve city name to IATA codes
|
|
277
|
-
|
|
326
|
+
star --github <username> Link GitHub \u2014 star repo for free access
|
|
327
|
+
unlock <offer_id> Unlock offer (FREE with GitHub star)
|
|
278
328
|
book <offer_id> --passenger ... Book flight (FREE after unlock)
|
|
279
329
|
register --name ... --email ... Register new agent
|
|
280
|
-
setup-payment
|
|
330
|
+
setup-payment Legacy payment setup
|
|
281
331
|
me Show agent profile
|
|
282
332
|
|
|
283
333
|
Options:
|
|
@@ -286,10 +336,11 @@ Options:
|
|
|
286
336
|
--base-url API URL (default: https://api.letsfg.co)
|
|
287
337
|
|
|
288
338
|
Examples:
|
|
339
|
+
letsfg register --name my-agent --email me@example.com
|
|
340
|
+
letsfg star --github octocat
|
|
289
341
|
letsfg search GDN BER 2026-03-03 --sort price
|
|
290
|
-
letsfg search LON BCN 2026-04-01 --return 2026-04-08 --json
|
|
291
342
|
letsfg unlock off_xxx
|
|
292
|
-
letsfg book off_xxx -p '{"id":"pas_xxx"
|
|
343
|
+
letsfg book off_xxx -p '{"id":"pas_xxx",...}' -e john@ex.com
|
|
293
344
|
`;
|
|
294
345
|
async function main() {
|
|
295
346
|
const args = process.argv.slice(2);
|
|
@@ -311,6 +362,9 @@ async function main() {
|
|
|
311
362
|
case "register":
|
|
312
363
|
await cmdRegister(args);
|
|
313
364
|
break;
|
|
365
|
+
case "star":
|
|
366
|
+
await cmdStar(args);
|
|
367
|
+
break;
|
|
314
368
|
case "setup-payment":
|
|
315
369
|
await cmdSetupPayment(args);
|
|
316
370
|
break;
|
package/dist/index.d.mts
CHANGED
|
@@ -218,7 +218,7 @@ declare class LetsFG {
|
|
|
218
218
|
*/
|
|
219
219
|
resolveLocation(query: string): Promise<Array<Record<string, unknown>>>;
|
|
220
220
|
/**
|
|
221
|
-
* Unlock a flight offer —
|
|
221
|
+
* Unlock a flight offer — FREE with GitHub star.
|
|
222
222
|
* Confirms price, reserves for 30 minutes.
|
|
223
223
|
*/
|
|
224
224
|
unlock(offerId: string): Promise<UnlockResult>;
|
|
@@ -230,13 +230,13 @@ declare class LetsFG {
|
|
|
230
230
|
*/
|
|
231
231
|
book(offerId: string, passengers: Passenger[], contactEmail: string, contactPhone?: string, idempotencyKey?: string): Promise<BookingResult>;
|
|
232
232
|
/**
|
|
233
|
-
* Set up payment method (
|
|
233
|
+
* Set up payment method (legacy — use linkGithub instead).
|
|
234
234
|
*/
|
|
235
235
|
setupPayment(token?: string): Promise<Record<string, unknown>>;
|
|
236
236
|
/**
|
|
237
237
|
* Start automated checkout — drives to payment page, NEVER submits payment.
|
|
238
238
|
*
|
|
239
|
-
* Requires unlock first
|
|
239
|
+
* Requires unlock first. Returns progress with screenshot and
|
|
240
240
|
* booking URL for manual completion.
|
|
241
241
|
*
|
|
242
242
|
* @param offerId - Offer ID from search results
|
|
@@ -253,6 +253,13 @@ declare class LetsFG {
|
|
|
253
253
|
* @param checkoutToken - Token from unlock()
|
|
254
254
|
*/
|
|
255
255
|
startCheckoutLocal(offer: FlightOffer, passengers: Passenger[], checkoutToken: string): Promise<CheckoutProgress>;
|
|
256
|
+
/**
|
|
257
|
+
* Link GitHub account for FREE unlimited access.
|
|
258
|
+
*
|
|
259
|
+
* Star https://github.com/LetsFG/LetsFG, then call this with your username.
|
|
260
|
+
* Once verified, access is permanent.
|
|
261
|
+
*/
|
|
262
|
+
linkGithub(githubUsername: string): Promise<Record<string, unknown>>;
|
|
256
263
|
/**
|
|
257
264
|
* Get current agent profile and usage stats.
|
|
258
265
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -218,7 +218,7 @@ declare class LetsFG {
|
|
|
218
218
|
*/
|
|
219
219
|
resolveLocation(query: string): Promise<Array<Record<string, unknown>>>;
|
|
220
220
|
/**
|
|
221
|
-
* Unlock a flight offer —
|
|
221
|
+
* Unlock a flight offer — FREE with GitHub star.
|
|
222
222
|
* Confirms price, reserves for 30 minutes.
|
|
223
223
|
*/
|
|
224
224
|
unlock(offerId: string): Promise<UnlockResult>;
|
|
@@ -230,13 +230,13 @@ declare class LetsFG {
|
|
|
230
230
|
*/
|
|
231
231
|
book(offerId: string, passengers: Passenger[], contactEmail: string, contactPhone?: string, idempotencyKey?: string): Promise<BookingResult>;
|
|
232
232
|
/**
|
|
233
|
-
* Set up payment method (
|
|
233
|
+
* Set up payment method (legacy — use linkGithub instead).
|
|
234
234
|
*/
|
|
235
235
|
setupPayment(token?: string): Promise<Record<string, unknown>>;
|
|
236
236
|
/**
|
|
237
237
|
* Start automated checkout — drives to payment page, NEVER submits payment.
|
|
238
238
|
*
|
|
239
|
-
* Requires unlock first
|
|
239
|
+
* Requires unlock first. Returns progress with screenshot and
|
|
240
240
|
* booking URL for manual completion.
|
|
241
241
|
*
|
|
242
242
|
* @param offerId - Offer ID from search results
|
|
@@ -253,6 +253,13 @@ declare class LetsFG {
|
|
|
253
253
|
* @param checkoutToken - Token from unlock()
|
|
254
254
|
*/
|
|
255
255
|
startCheckoutLocal(offer: FlightOffer, passengers: Passenger[], checkoutToken: string): Promise<CheckoutProgress>;
|
|
256
|
+
/**
|
|
257
|
+
* Link GitHub account for FREE unlimited access.
|
|
258
|
+
*
|
|
259
|
+
* Star https://github.com/LetsFG/LetsFG, then call this with your username.
|
|
260
|
+
* Once verified, access is permanent.
|
|
261
|
+
*/
|
|
262
|
+
linkGithub(githubUsername: string): Promise<Record<string, unknown>>;
|
|
256
263
|
/**
|
|
257
264
|
* Get current agent profile and usage stats.
|
|
258
265
|
*/
|
package/dist/index.js
CHANGED
|
@@ -280,7 +280,7 @@ var LetsFG = class {
|
|
|
280
280
|
return data ? [data] : [];
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
|
-
* Unlock a flight offer —
|
|
283
|
+
* Unlock a flight offer — FREE with GitHub star.
|
|
284
284
|
* Confirms price, reserves for 30 minutes.
|
|
285
285
|
*/
|
|
286
286
|
async unlock(offerId) {
|
|
@@ -306,7 +306,7 @@ var LetsFG = class {
|
|
|
306
306
|
return this.post("/api/v1/bookings/book", body);
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
|
-
* Set up payment method (
|
|
309
|
+
* Set up payment method (legacy — use linkGithub instead).
|
|
310
310
|
*/
|
|
311
311
|
async setupPayment(token = "tok_visa") {
|
|
312
312
|
this.requireApiKey();
|
|
@@ -315,7 +315,7 @@ var LetsFG = class {
|
|
|
315
315
|
/**
|
|
316
316
|
* Start automated checkout — drives to payment page, NEVER submits payment.
|
|
317
317
|
*
|
|
318
|
-
* Requires unlock first
|
|
318
|
+
* Requires unlock first. Returns progress with screenshot and
|
|
319
319
|
* booking URL for manual completion.
|
|
320
320
|
*
|
|
321
321
|
* @param offerId - Offer ID from search results
|
|
@@ -378,6 +378,16 @@ var LetsFG = class {
|
|
|
378
378
|
child.stdin.end();
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* Link GitHub account for FREE unlimited access.
|
|
383
|
+
*
|
|
384
|
+
* Star https://github.com/LetsFG/LetsFG, then call this with your username.
|
|
385
|
+
* Once verified, access is permanent.
|
|
386
|
+
*/
|
|
387
|
+
async linkGithub(githubUsername) {
|
|
388
|
+
this.requireApiKey();
|
|
389
|
+
return this.post(`/api/v1/agents/link-github?github_username=${encodeURIComponent(githubUsername)}`, {});
|
|
390
|
+
}
|
|
381
391
|
/**
|
|
382
392
|
* Get current agent profile and usage stats.
|
|
383
393
|
*/
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "letsfg",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Agent-native flight search & booking. 75 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",
|