letsfg 2026.5.57 → 2026.5.58
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-3F2FJHVG.mjs → chunk-I2JLOQPR.mjs} +9 -2
- package/dist/cli.js +21 -10
- package/dist/cli.mjs +13 -9
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +9 -2
- package/dist/index.mjs +1 -1
- package/package.json +52 -52
|
@@ -1653,7 +1653,11 @@ var LetsFG = class {
|
|
|
1653
1653
|
return this.post("/developers/api/v1/bookings/book", body);
|
|
1654
1654
|
}
|
|
1655
1655
|
/**
|
|
1656
|
-
*
|
|
1656
|
+
* [Developer API only] Attach a card to a PAID prepaid Developer API account.
|
|
1657
|
+
*
|
|
1658
|
+
* Most agents should NOT call this. It is unrelated to authenticating for
|
|
1659
|
+
* search and booking — for that, run `letsfg auth`, which puts a card on file
|
|
1660
|
+
* through a zero-amount setup and creates no billing account.
|
|
1657
1661
|
*/
|
|
1658
1662
|
async setupPayment(token = "tok_visa") {
|
|
1659
1663
|
this.requireApiKey();
|
|
@@ -1668,7 +1672,10 @@ var LetsFG = class {
|
|
|
1668
1672
|
}
|
|
1669
1673
|
// ── Static methods ───────────────────────────────────────────────────
|
|
1670
1674
|
/**
|
|
1671
|
-
*
|
|
1675
|
+
* [Developer API only] Create a PAID Developer API account with its own billing.
|
|
1676
|
+
*
|
|
1677
|
+
* Most agents should NOT call this — it creates a billing account you probably
|
|
1678
|
+
* do not want. To search and book flights, run `letsfg auth` instead.
|
|
1672
1679
|
*/
|
|
1673
1680
|
static async register(agentName, email, baseUrl, ownerName = "", description = "") {
|
|
1674
1681
|
const url = (baseUrl || DEFAULT_BASE_URL).replace(/\/$/, "");
|
package/dist/cli.js
CHANGED
|
@@ -408,7 +408,11 @@ var LetsFG = class {
|
|
|
408
408
|
return this.post("/developers/api/v1/bookings/book", body);
|
|
409
409
|
}
|
|
410
410
|
/**
|
|
411
|
-
*
|
|
411
|
+
* [Developer API only] Attach a card to a PAID prepaid Developer API account.
|
|
412
|
+
*
|
|
413
|
+
* Most agents should NOT call this. It is unrelated to authenticating for
|
|
414
|
+
* search and booking — for that, run `letsfg auth`, which puts a card on file
|
|
415
|
+
* through a zero-amount setup and creates no billing account.
|
|
412
416
|
*/
|
|
413
417
|
async setupPayment(token = "tok_visa") {
|
|
414
418
|
this.requireApiKey();
|
|
@@ -423,7 +427,10 @@ var LetsFG = class {
|
|
|
423
427
|
}
|
|
424
428
|
// ── Static methods ───────────────────────────────────────────────────
|
|
425
429
|
/**
|
|
426
|
-
*
|
|
430
|
+
* [Developer API only] Create a PAID Developer API account with its own billing.
|
|
431
|
+
*
|
|
432
|
+
* Most agents should NOT call this — it creates a billing account you probably
|
|
433
|
+
* do not want. To search and book flights, run `letsfg auth` instead.
|
|
427
434
|
*/
|
|
428
435
|
static async register(agentName, email, baseUrl, ownerName = "", description = "") {
|
|
429
436
|
const url = (baseUrl || DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
@@ -764,27 +771,31 @@ var HELP = `
|
|
|
764
771
|
LetsFG \u2014 Agent-native flight search & booking.
|
|
765
772
|
|
|
766
773
|
Search hundreds of airlines via the LetsFG cloud engine.
|
|
767
|
-
|
|
774
|
+
Authenticate once with letsfg auth \u2014 a zero-amount card setup, nothing is
|
|
775
|
+
charged \u2014 then search and book.
|
|
768
776
|
|
|
769
777
|
Commands:
|
|
778
|
+
auth Put a card on file -> 90-day token. Nothing charged
|
|
770
779
|
search <origin> <dest> <date> Search for flights (free)
|
|
771
780
|
locations <query> Resolve city name to IATA codes
|
|
772
|
-
|
|
773
|
-
book <offer_id> --passenger ... Book flight \u2014 charges ticket price via Stripe
|
|
774
|
-
register --name ... --email ... Register for a Developer API key
|
|
775
|
-
setup-payment Attach Stripe payment method
|
|
781
|
+
book <offer_id> --passenger ... Book a flight. No LetsFG fee
|
|
776
782
|
me Show agent profile
|
|
777
783
|
|
|
784
|
+
Developer API only (a SEPARATE paid product \u2014 most agents should not use these;
|
|
785
|
+
they create a billing account. Use auth above instead):
|
|
786
|
+
register --name ... --email ... Create a paid Developer API account
|
|
787
|
+
setup-payment Attach a card to that paid account
|
|
788
|
+
unlock <offer_id> Unlock offer \u2014 1% of ticket (min $3)
|
|
789
|
+
|
|
778
790
|
Options:
|
|
779
791
|
--json, -j Output raw JSON
|
|
780
792
|
--api-key, -k API key (or set LETSFG_API_KEY)
|
|
781
793
|
--base-url API URL (default: https://letsfg.co/developers)
|
|
782
794
|
|
|
783
795
|
Examples:
|
|
784
|
-
letsfg
|
|
796
|
+
letsfg auth
|
|
785
797
|
letsfg search GDN BER 2026-03-03 --sort price
|
|
786
|
-
letsfg
|
|
787
|
-
letsfg book off_xxx -p '{"id":"pas_xxx",...}' -e john@ex.com
|
|
798
|
+
letsfg book off_xxx -p '{"given_name":"Ada",...}' -e ada@example.com
|
|
788
799
|
`;
|
|
789
800
|
async function main() {
|
|
790
801
|
const args = process.argv.slice(2);
|
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-I2JLOQPR.mjs";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
function getFlag(args, flag, alias) {
|
|
@@ -274,27 +274,31 @@ var HELP = `
|
|
|
274
274
|
LetsFG \u2014 Agent-native flight search & booking.
|
|
275
275
|
|
|
276
276
|
Search hundreds of airlines via the LetsFG cloud engine.
|
|
277
|
-
|
|
277
|
+
Authenticate once with letsfg auth \u2014 a zero-amount card setup, nothing is
|
|
278
|
+
charged \u2014 then search and book.
|
|
278
279
|
|
|
279
280
|
Commands:
|
|
281
|
+
auth Put a card on file -> 90-day token. Nothing charged
|
|
280
282
|
search <origin> <dest> <date> Search for flights (free)
|
|
281
283
|
locations <query> Resolve city name to IATA codes
|
|
282
|
-
|
|
283
|
-
book <offer_id> --passenger ... Book flight \u2014 charges ticket price via Stripe
|
|
284
|
-
register --name ... --email ... Register for a Developer API key
|
|
285
|
-
setup-payment Attach Stripe payment method
|
|
284
|
+
book <offer_id> --passenger ... Book a flight. No LetsFG fee
|
|
286
285
|
me Show agent profile
|
|
287
286
|
|
|
287
|
+
Developer API only (a SEPARATE paid product \u2014 most agents should not use these;
|
|
288
|
+
they create a billing account. Use auth above instead):
|
|
289
|
+
register --name ... --email ... Create a paid Developer API account
|
|
290
|
+
setup-payment Attach a card to that paid account
|
|
291
|
+
unlock <offer_id> Unlock offer \u2014 1% of ticket (min $3)
|
|
292
|
+
|
|
288
293
|
Options:
|
|
289
294
|
--json, -j Output raw JSON
|
|
290
295
|
--api-key, -k API key (or set LETSFG_API_KEY)
|
|
291
296
|
--base-url API URL (default: https://letsfg.co/developers)
|
|
292
297
|
|
|
293
298
|
Examples:
|
|
294
|
-
letsfg
|
|
299
|
+
letsfg auth
|
|
295
300
|
letsfg search GDN BER 2026-03-03 --sort price
|
|
296
|
-
letsfg
|
|
297
|
-
letsfg book off_xxx -p '{"id":"pas_xxx",...}' -e john@ex.com
|
|
301
|
+
letsfg book off_xxx -p '{"given_name":"Ada",...}' -e ada@example.com
|
|
298
302
|
`;
|
|
299
303
|
async function main() {
|
|
300
304
|
const args = process.argv.slice(2);
|
package/dist/index.d.mts
CHANGED
|
@@ -481,7 +481,11 @@ declare class LetsFG {
|
|
|
481
481
|
*/
|
|
482
482
|
book(offerId: string, passengers: Passenger[], contactEmail: string, contactPhone?: string, idempotencyKey?: string): Promise<BookingResult>;
|
|
483
483
|
/**
|
|
484
|
-
*
|
|
484
|
+
* [Developer API only] Attach a card to a PAID prepaid Developer API account.
|
|
485
|
+
*
|
|
486
|
+
* Most agents should NOT call this. It is unrelated to authenticating for
|
|
487
|
+
* search and booking — for that, run `letsfg auth`, which puts a card on file
|
|
488
|
+
* through a zero-amount setup and creates no billing account.
|
|
485
489
|
*/
|
|
486
490
|
setupPayment(token?: string): Promise<Record<string, unknown>>;
|
|
487
491
|
/**
|
|
@@ -489,7 +493,10 @@ declare class LetsFG {
|
|
|
489
493
|
*/
|
|
490
494
|
me(): Promise<Record<string, unknown>>;
|
|
491
495
|
/**
|
|
492
|
-
*
|
|
496
|
+
* [Developer API only] Create a PAID Developer API account with its own billing.
|
|
497
|
+
*
|
|
498
|
+
* Most agents should NOT call this — it creates a billing account you probably
|
|
499
|
+
* do not want. To search and book flights, run `letsfg auth` instead.
|
|
493
500
|
*/
|
|
494
501
|
static register(agentName: string, email: string, baseUrl?: string, ownerName?: string, description?: string): Promise<Record<string, unknown>>;
|
|
495
502
|
private postWithBearer;
|
package/dist/index.d.ts
CHANGED
|
@@ -481,7 +481,11 @@ declare class LetsFG {
|
|
|
481
481
|
*/
|
|
482
482
|
book(offerId: string, passengers: Passenger[], contactEmail: string, contactPhone?: string, idempotencyKey?: string): Promise<BookingResult>;
|
|
483
483
|
/**
|
|
484
|
-
*
|
|
484
|
+
* [Developer API only] Attach a card to a PAID prepaid Developer API account.
|
|
485
|
+
*
|
|
486
|
+
* Most agents should NOT call this. It is unrelated to authenticating for
|
|
487
|
+
* search and booking — for that, run `letsfg auth`, which puts a card on file
|
|
488
|
+
* through a zero-amount setup and creates no billing account.
|
|
485
489
|
*/
|
|
486
490
|
setupPayment(token?: string): Promise<Record<string, unknown>>;
|
|
487
491
|
/**
|
|
@@ -489,7 +493,10 @@ declare class LetsFG {
|
|
|
489
493
|
*/
|
|
490
494
|
me(): Promise<Record<string, unknown>>;
|
|
491
495
|
/**
|
|
492
|
-
*
|
|
496
|
+
* [Developer API only] Create a PAID Developer API account with its own billing.
|
|
497
|
+
*
|
|
498
|
+
* Most agents should NOT call this — it creates a billing account you probably
|
|
499
|
+
* do not want. To search and book flights, run `letsfg auth` instead.
|
|
493
500
|
*/
|
|
494
501
|
static register(agentName: string, email: string, baseUrl?: string, ownerName?: string, description?: string): Promise<Record<string, unknown>>;
|
|
495
502
|
private postWithBearer;
|
package/dist/index.js
CHANGED
|
@@ -1701,7 +1701,11 @@ var LetsFG = class {
|
|
|
1701
1701
|
return this.post("/developers/api/v1/bookings/book", body);
|
|
1702
1702
|
}
|
|
1703
1703
|
/**
|
|
1704
|
-
*
|
|
1704
|
+
* [Developer API only] Attach a card to a PAID prepaid Developer API account.
|
|
1705
|
+
*
|
|
1706
|
+
* Most agents should NOT call this. It is unrelated to authenticating for
|
|
1707
|
+
* search and booking — for that, run `letsfg auth`, which puts a card on file
|
|
1708
|
+
* through a zero-amount setup and creates no billing account.
|
|
1705
1709
|
*/
|
|
1706
1710
|
async setupPayment(token = "tok_visa") {
|
|
1707
1711
|
this.requireApiKey();
|
|
@@ -1716,7 +1720,10 @@ var LetsFG = class {
|
|
|
1716
1720
|
}
|
|
1717
1721
|
// ── Static methods ───────────────────────────────────────────────────
|
|
1718
1722
|
/**
|
|
1719
|
-
*
|
|
1723
|
+
* [Developer API only] Create a PAID Developer API account with its own billing.
|
|
1724
|
+
*
|
|
1725
|
+
* Most agents should NOT call this — it creates a billing account you probably
|
|
1726
|
+
* do not want. To search and book flights, run `letsfg auth` instead.
|
|
1720
1727
|
*/
|
|
1721
1728
|
static async register(agentName, email, baseUrl, ownerName = "", description = "") {
|
|
1722
1729
|
const url = (baseUrl || DEFAULT_BASE_URL).replace(/\/$/, "");
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "letsfg",
|
|
3
|
-
"version": "2026.5.
|
|
4
|
-
"description": "Flight search & booking for AI agents. Server-side engine covers hundreds of airlines. Free search via Bearer token or prepaid Developer API. Includes open-source ranking engine.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"bin": {
|
|
9
|
-
"letsfg": "dist/cli.js"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist/",
|
|
13
|
-
"README.md",
|
|
14
|
-
"LICENSE"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean",
|
|
18
|
-
"test": "tsx --test src/index.test.ts",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"flights",
|
|
23
|
-
"travel",
|
|
24
|
-
"booking",
|
|
25
|
-
"agent",
|
|
26
|
-
"ai",
|
|
27
|
-
"cli",
|
|
28
|
-
"autonomous",
|
|
29
|
-
"mcp",
|
|
30
|
-
"openai",
|
|
31
|
-
"airline",
|
|
32
|
-
"ndc",
|
|
33
|
-
"search",
|
|
34
|
-
"ndc"
|
|
35
|
-
],
|
|
36
|
-
"author": "LetsFG",
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/LetsFG/LetsFG.git"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://letsfg.co",
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@types/node": "^25.3.3",
|
|
45
|
-
"tsup": "^8.0.0",
|
|
46
|
-
"tsx": "^4.19.0",
|
|
47
|
-
"typescript": "^5.3.0"
|
|
48
|
-
},
|
|
49
|
-
"engines": {
|
|
50
|
-
"node": ">=18.0.0"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "letsfg",
|
|
3
|
+
"version": "2026.5.58",
|
|
4
|
+
"description": "Flight search & booking for AI agents. Server-side engine covers hundreds of airlines. Free search via Bearer token or prepaid Developer API. Includes open-source ranking engine.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"letsfg": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean",
|
|
18
|
+
"test": "tsx --test src/index.test.ts",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"flights",
|
|
23
|
+
"travel",
|
|
24
|
+
"booking",
|
|
25
|
+
"agent",
|
|
26
|
+
"ai",
|
|
27
|
+
"cli",
|
|
28
|
+
"autonomous",
|
|
29
|
+
"mcp",
|
|
30
|
+
"openai",
|
|
31
|
+
"airline",
|
|
32
|
+
"ndc",
|
|
33
|
+
"search",
|
|
34
|
+
"ndc"
|
|
35
|
+
],
|
|
36
|
+
"author": "LetsFG",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/LetsFG/LetsFG.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://letsfg.co",
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^25.3.3",
|
|
45
|
+
"tsup": "^8.0.0",
|
|
46
|
+
"tsx": "^4.19.0",
|
|
47
|
+
"typescript": "^5.3.0"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|