@opentabs-dev/opentabs-plugin-priceline 0.0.84 → 0.0.86

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.
Files changed (36) hide show
  1. package/README.md +11 -1
  2. package/dist/adapter.iife.js +1629 -522
  3. package/dist/adapter.iife.js.map +4 -4
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +11 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/priceline-api.d.ts +3 -1
  8. package/dist/priceline-api.d.ts.map +1 -1
  9. package/dist/priceline-api.js +40 -3
  10. package/dist/priceline-api.js.map +1 -1
  11. package/dist/tools/find-cheapest-flight-date.d.ts +28 -0
  12. package/dist/tools/find-cheapest-flight-date.d.ts.map +1 -0
  13. package/dist/tools/find-cheapest-flight-date.js +77 -0
  14. package/dist/tools/find-cheapest-flight-date.js.map +1 -0
  15. package/dist/tools/get-flight-price-calendar.d.ts +30 -0
  16. package/dist/tools/get-flight-price-calendar.d.ts.map +1 -0
  17. package/dist/tools/get-flight-price-calendar.js +97 -0
  18. package/dist/tools/get-flight-price-calendar.js.map +1 -0
  19. package/dist/tools/list-flight-price-watches.d.ts +17 -0
  20. package/dist/tools/list-flight-price-watches.d.ts.map +1 -0
  21. package/dist/tools/list-flight-price-watches.js +54 -0
  22. package/dist/tools/list-flight-price-watches.js.map +1 -0
  23. package/dist/tools/navigate-to-flight-search.d.ts +21 -0
  24. package/dist/tools/navigate-to-flight-search.d.ts.map +1 -0
  25. package/dist/tools/navigate-to-flight-search.js +43 -0
  26. package/dist/tools/navigate-to-flight-search.js.map +1 -0
  27. package/dist/tools/schemas.d.ts +111 -0
  28. package/dist/tools/schemas.d.ts.map +1 -1
  29. package/dist/tools/schemas.js +79 -0
  30. package/dist/tools/schemas.js.map +1 -1
  31. package/dist/tools/search-airports.d.ts +17 -0
  32. package/dist/tools/search-airports.d.ts.map +1 -0
  33. package/dist/tools/search-airports.js +25 -0
  34. package/dist/tools/search-airports.js.map +1 -0
  35. package/dist/tools.json +534 -1
  36. package/package.json +4 -4
package/dist/tools.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "sdkVersion": "0.0.99",
2
+ "sdkVersion": "0.0.107",
3
3
  "iconSvg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M6 3h7a5 5 0 0 1 0 10H9v8H6V3zm3 3v4h4a2 2 0 0 0 0-4H9z\" fill=\"#0068EF\"/> </svg>",
4
4
  "iconInactiveSvg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M6 3h7a5 5 0 0 1 0 10H9v8H6V3zm3 3v4h4a2 2 0 0 0 0-4H9z\" fill=\"#999999\"/> </svg>",
5
5
  "iconDarkSvg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M6 3h7a5 5 0 0 1 0 10H9v8H6V3zm3 3v4h4a2 2 0 0 0 0-4H9z\" fill=\"#0068EF\"/> </svg>",
@@ -862,6 +862,539 @@
862
862
  "additionalProperties": false
863
863
  }
864
864
  },
865
+ {
866
+ "name": "search_airports",
867
+ "displayName": "Search Airports",
868
+ "description": "Find airports and multi-airport metro areas matching a keyword. Returns IATA codes (e.g., JFK, LAX) for specific airports and three-letter city codes (e.g., NYC, LON) for metros that combine all nearby airports. Use the returned `id` value as the origin or destination code in other flight tools. Results are ranked by relevance.",
869
+ "summary": "Find airport and city codes by keyword",
870
+ "icon": "plane-takeoff",
871
+ "group": "Flights",
872
+ "input_schema": {
873
+ "type": "object",
874
+ "properties": {
875
+ "keyword": {
876
+ "type": "string",
877
+ "description": "Search keyword — a city name, airport name, or IATA code (e.g., \"new york\", \"heathrow\", \"JFK\")"
878
+ }
879
+ },
880
+ "required": [
881
+ "keyword"
882
+ ],
883
+ "additionalProperties": false
884
+ },
885
+ "output_schema": {
886
+ "type": "object",
887
+ "properties": {
888
+ "airports": {
889
+ "type": "array",
890
+ "items": {
891
+ "type": "object",
892
+ "properties": {
893
+ "id": {
894
+ "type": "string",
895
+ "description": "IATA code for an airport (e.g., JFK, LAX) or city code for a metro area (e.g., NYC)"
896
+ },
897
+ "type": {
898
+ "type": "string",
899
+ "description": "Entry type — AIRPORT for a specific airport, GDS_CITY for a multi-airport metropolitan area"
900
+ },
901
+ "display_name": {
902
+ "type": "string",
903
+ "description": "Full display name (e.g., \"New York City, NY - John F Kennedy Intl Airport (JFK)\")"
904
+ },
905
+ "city_name": {
906
+ "type": "string",
907
+ "description": "City name"
908
+ },
909
+ "state_code": {
910
+ "type": "string",
911
+ "description": "State or province code (US only)"
912
+ },
913
+ "country_code": {
914
+ "type": "string",
915
+ "description": "ISO country code (e.g., US, GB)"
916
+ },
917
+ "latitude": {
918
+ "type": "number",
919
+ "description": "Airport latitude in decimal degrees; 0 for multi-airport metro entries"
920
+ },
921
+ "longitude": {
922
+ "type": "number",
923
+ "description": "Airport longitude in decimal degrees; 0 for multi-airport metro entries"
924
+ },
925
+ "timezone": {
926
+ "type": "string",
927
+ "description": "IANA timezone name (e.g., America/New_York)"
928
+ }
929
+ },
930
+ "required": [
931
+ "id",
932
+ "type",
933
+ "display_name",
934
+ "city_name",
935
+ "state_code",
936
+ "country_code",
937
+ "latitude",
938
+ "longitude",
939
+ "timezone"
940
+ ],
941
+ "additionalProperties": false
942
+ },
943
+ "description": "Matching airports and metro areas ranked by relevance"
944
+ }
945
+ },
946
+ "required": [
947
+ "airports"
948
+ ],
949
+ "additionalProperties": false
950
+ }
951
+ },
952
+ {
953
+ "name": "get_flight_price_calendar",
954
+ "displayName": "Get Flight Price Calendar",
955
+ "description": "Get Priceline's fare forecast for a route over a date range. Returns the cheapest available fare for each date (or date combination for round-trips), along with departure/arrival times and stop counts. Pass a single `trips` entry for one-way, or two entries (outbound + return) for round-trip. Each trip can be a single date (`depart_date`) or a date window (`depart_date_from`/`depart_date_to`). Useful for finding the cheapest date to fly before booking.",
956
+ "summary": "Flight fare forecast for a date range",
957
+ "icon": "calendar-range",
958
+ "group": "Flights",
959
+ "input_schema": {
960
+ "type": "object",
961
+ "properties": {
962
+ "trips": {
963
+ "minItems": 1,
964
+ "maxItems": 6,
965
+ "type": "array",
966
+ "items": {
967
+ "type": "object",
968
+ "properties": {
969
+ "origin": {
970
+ "type": "string",
971
+ "description": "Origin airport/city code (e.g., JFK, NYC)"
972
+ },
973
+ "destination": {
974
+ "type": "string",
975
+ "description": "Destination airport/city code (e.g., LAX, LON)"
976
+ },
977
+ "depart_date": {
978
+ "description": "Single departure date in YYYY-MM-DD format. Provide either this or depart_date_range, not both.",
979
+ "type": "string"
980
+ },
981
+ "depart_date_from": {
982
+ "description": "Start of departure date window in YYYY-MM-DD format. Pair with depart_date_to for range searches.",
983
+ "type": "string"
984
+ },
985
+ "depart_date_to": {
986
+ "description": "End of departure date window in YYYY-MM-DD format. Pair with depart_date_from for range searches.",
987
+ "type": "string"
988
+ }
989
+ },
990
+ "required": [
991
+ "origin",
992
+ "destination"
993
+ ],
994
+ "additionalProperties": false,
995
+ "description": "A single flight slice (leg). For one-way pass one slice; for round-trip pass two (outbound + return)."
996
+ },
997
+ "description": "Flight slices — 1 for one-way, 2 for round-trip, up to 6 for multi-city"
998
+ },
999
+ "cabin_class": {
1000
+ "description": "Cabin class filter (default ECO)",
1001
+ "type": "string",
1002
+ "enum": [
1003
+ "ECO",
1004
+ "PREMIUM",
1005
+ "BUS",
1006
+ "FIRST"
1007
+ ]
1008
+ }
1009
+ },
1010
+ "required": [
1011
+ "trips"
1012
+ ],
1013
+ "additionalProperties": false
1014
+ },
1015
+ "output_schema": {
1016
+ "type": "object",
1017
+ "properties": {
1018
+ "records": {
1019
+ "type": "array",
1020
+ "items": {
1021
+ "type": "object",
1022
+ "properties": {
1023
+ "dates": {
1024
+ "type": "array",
1025
+ "items": {
1026
+ "type": "string"
1027
+ },
1028
+ "description": "Travel date(s) in YYYY-MM-DD format. One entry for one-way searches; two entries (depart, return) for round-trip."
1029
+ },
1030
+ "min_price": {
1031
+ "type": "number",
1032
+ "description": "Minimum fare per passenger in the response currency"
1033
+ },
1034
+ "currency": {
1035
+ "type": "string",
1036
+ "description": "Currency code (e.g., USD)"
1037
+ },
1038
+ "is_private_fare": {
1039
+ "type": "boolean",
1040
+ "description": "Whether the fare is a members-only private rate"
1041
+ },
1042
+ "stops_by_slice": {
1043
+ "type": "array",
1044
+ "items": {
1045
+ "type": "object",
1046
+ "properties": {
1047
+ "slice_id": {
1048
+ "type": "integer",
1049
+ "minimum": -9007199254740991,
1050
+ "maximum": 9007199254740991,
1051
+ "description": "Slice number (1 for outbound, 2 for return)"
1052
+ },
1053
+ "stops": {
1054
+ "type": "integer",
1055
+ "minimum": -9007199254740991,
1056
+ "maximum": 9007199254740991,
1057
+ "description": "Number of stops for this slice (0 = non-stop)"
1058
+ }
1059
+ },
1060
+ "required": [
1061
+ "slice_id",
1062
+ "stops"
1063
+ ],
1064
+ "additionalProperties": false
1065
+ },
1066
+ "description": "Stop counts for each flight slice"
1067
+ },
1068
+ "takeoff_times": {
1069
+ "type": "array",
1070
+ "items": {
1071
+ "type": "string"
1072
+ },
1073
+ "description": "Departure times per slice in HH:MM (24h)"
1074
+ },
1075
+ "landing_times": {
1076
+ "type": "array",
1077
+ "items": {
1078
+ "type": "string"
1079
+ },
1080
+ "description": "Arrival times per slice in HH:MM (24h)"
1081
+ }
1082
+ },
1083
+ "required": [
1084
+ "dates",
1085
+ "min_price",
1086
+ "currency",
1087
+ "is_private_fare",
1088
+ "stops_by_slice",
1089
+ "takeoff_times",
1090
+ "landing_times"
1091
+ ],
1092
+ "additionalProperties": false
1093
+ },
1094
+ "description": "Cheapest fares by date combination, sorted by trip dates"
1095
+ }
1096
+ },
1097
+ "required": [
1098
+ "records"
1099
+ ],
1100
+ "additionalProperties": false
1101
+ }
1102
+ },
1103
+ {
1104
+ "name": "find_cheapest_flight_date",
1105
+ "displayName": "Find Cheapest Flight Date",
1106
+ "description": "Find the single cheapest date to fly a route within a given date window. Returns the bottom N fares ordered from lowest to highest price, so the caller can pick the best date that fits their schedule. Works for one-way routes; for round-trip price optimization use get_flight_price_calendar with two trips.",
1107
+ "summary": "Find the cheapest flight date in a window",
1108
+ "icon": "piggy-bank",
1109
+ "group": "Flights",
1110
+ "input_schema": {
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "origin": {
1114
+ "type": "string",
1115
+ "description": "Origin airport or city code (e.g., JFK, NYC)"
1116
+ },
1117
+ "destination": {
1118
+ "type": "string",
1119
+ "description": "Destination airport or city code (e.g., LAX, LON)"
1120
+ },
1121
+ "depart_date_from": {
1122
+ "type": "string",
1123
+ "description": "Start of departure window in YYYY-MM-DD format"
1124
+ },
1125
+ "depart_date_to": {
1126
+ "type": "string",
1127
+ "description": "End of departure window in YYYY-MM-DD format"
1128
+ },
1129
+ "top_n": {
1130
+ "description": "Number of cheapest dates to return (default 5, max 30)",
1131
+ "type": "integer",
1132
+ "minimum": 1,
1133
+ "maximum": 30
1134
+ },
1135
+ "cabin_class": {
1136
+ "description": "Cabin class filter (default ECO)",
1137
+ "type": "string",
1138
+ "enum": [
1139
+ "ECO",
1140
+ "PREMIUM",
1141
+ "BUS",
1142
+ "FIRST"
1143
+ ]
1144
+ }
1145
+ },
1146
+ "required": [
1147
+ "origin",
1148
+ "destination",
1149
+ "depart_date_from",
1150
+ "depart_date_to"
1151
+ ],
1152
+ "additionalProperties": false
1153
+ },
1154
+ "output_schema": {
1155
+ "type": "object",
1156
+ "properties": {
1157
+ "records": {
1158
+ "type": "array",
1159
+ "items": {
1160
+ "type": "object",
1161
+ "properties": {
1162
+ "dates": {
1163
+ "type": "array",
1164
+ "items": {
1165
+ "type": "string"
1166
+ },
1167
+ "description": "Travel date(s) in YYYY-MM-DD format. One entry for one-way searches; two entries (depart, return) for round-trip."
1168
+ },
1169
+ "min_price": {
1170
+ "type": "number",
1171
+ "description": "Minimum fare per passenger in the response currency"
1172
+ },
1173
+ "currency": {
1174
+ "type": "string",
1175
+ "description": "Currency code (e.g., USD)"
1176
+ },
1177
+ "is_private_fare": {
1178
+ "type": "boolean",
1179
+ "description": "Whether the fare is a members-only private rate"
1180
+ },
1181
+ "stops_by_slice": {
1182
+ "type": "array",
1183
+ "items": {
1184
+ "type": "object",
1185
+ "properties": {
1186
+ "slice_id": {
1187
+ "type": "integer",
1188
+ "minimum": -9007199254740991,
1189
+ "maximum": 9007199254740991,
1190
+ "description": "Slice number (1 for outbound, 2 for return)"
1191
+ },
1192
+ "stops": {
1193
+ "type": "integer",
1194
+ "minimum": -9007199254740991,
1195
+ "maximum": 9007199254740991,
1196
+ "description": "Number of stops for this slice (0 = non-stop)"
1197
+ }
1198
+ },
1199
+ "required": [
1200
+ "slice_id",
1201
+ "stops"
1202
+ ],
1203
+ "additionalProperties": false
1204
+ },
1205
+ "description": "Stop counts for each flight slice"
1206
+ },
1207
+ "takeoff_times": {
1208
+ "type": "array",
1209
+ "items": {
1210
+ "type": "string"
1211
+ },
1212
+ "description": "Departure times per slice in HH:MM (24h)"
1213
+ },
1214
+ "landing_times": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "type": "string"
1218
+ },
1219
+ "description": "Arrival times per slice in HH:MM (24h)"
1220
+ }
1221
+ },
1222
+ "required": [
1223
+ "dates",
1224
+ "min_price",
1225
+ "currency",
1226
+ "is_private_fare",
1227
+ "stops_by_slice",
1228
+ "takeoff_times",
1229
+ "landing_times"
1230
+ ],
1231
+ "additionalProperties": false
1232
+ },
1233
+ "description": "Cheapest flight dates in the window, sorted ascending by price"
1234
+ }
1235
+ },
1236
+ "required": [
1237
+ "records"
1238
+ ],
1239
+ "additionalProperties": false
1240
+ }
1241
+ },
1242
+ {
1243
+ "name": "list_flight_price_watches",
1244
+ "displayName": "List Flight Price Watches",
1245
+ "description": "List the authenticated user's active Priceline flight price watches. Returns watches the user has set up to track fare changes on specific routes. Each entry includes origin, destination, travel dates, cabin class, current price, and target price.",
1246
+ "summary": "List user's flight price alerts",
1247
+ "icon": "bell",
1248
+ "group": "Flights",
1249
+ "input_schema": {
1250
+ "type": "object",
1251
+ "properties": {
1252
+ "include_inactive": {
1253
+ "description": "Include inactive (paused or expired) watches in addition to active ones (default false)",
1254
+ "type": "boolean"
1255
+ }
1256
+ },
1257
+ "additionalProperties": false
1258
+ },
1259
+ "output_schema": {
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "price_watches": {
1263
+ "type": "array",
1264
+ "items": {
1265
+ "type": "object",
1266
+ "properties": {
1267
+ "origin_code": {
1268
+ "type": "string",
1269
+ "description": "Origin airport or city code"
1270
+ },
1271
+ "destination_code": {
1272
+ "type": "string",
1273
+ "description": "Destination airport or city code"
1274
+ },
1275
+ "depart_date": {
1276
+ "type": "string",
1277
+ "description": "Outbound date in YYYY-MM-DD format"
1278
+ },
1279
+ "return_date": {
1280
+ "type": "string",
1281
+ "description": "Return date in YYYY-MM-DD format, empty for one-way watches"
1282
+ },
1283
+ "cabin_class": {
1284
+ "type": "string",
1285
+ "description": "Cabin class (ECO, BUS, FIRST)"
1286
+ },
1287
+ "current_price": {
1288
+ "type": "number",
1289
+ "description": "Most recently observed minimum fare"
1290
+ },
1291
+ "target_price": {
1292
+ "type": "number",
1293
+ "description": "User-set target fare for alerts"
1294
+ },
1295
+ "is_active": {
1296
+ "type": "boolean",
1297
+ "description": "Whether the watch is currently active"
1298
+ },
1299
+ "created_at": {
1300
+ "type": "string",
1301
+ "description": "When the watch was created (ISO 8601)"
1302
+ }
1303
+ },
1304
+ "required": [
1305
+ "origin_code",
1306
+ "destination_code",
1307
+ "depart_date",
1308
+ "return_date",
1309
+ "cabin_class",
1310
+ "current_price",
1311
+ "target_price",
1312
+ "is_active",
1313
+ "created_at"
1314
+ ],
1315
+ "additionalProperties": false
1316
+ },
1317
+ "description": "Active flight price watches for the signed-in user"
1318
+ }
1319
+ },
1320
+ "required": [
1321
+ "price_watches"
1322
+ ],
1323
+ "additionalProperties": false
1324
+ }
1325
+ },
1326
+ {
1327
+ "name": "navigate_to_flight_search",
1328
+ "displayName": "Navigate to Flight Search",
1329
+ "description": "Open Priceline's flight search results page for a given route and dates in the user's browser. This navigates the current tab so the user can review flights, apply filters, and book in their authenticated session. Use this after get_flight_price_calendar or find_cheapest_flight_date has identified a good route/date — it hands control back to the user for the full search and booking flow. Requires airport/city codes (use search_airports to find them).",
1330
+ "summary": "Open Priceline flight search for a route",
1331
+ "icon": "plane",
1332
+ "group": "Flights",
1333
+ "input_schema": {
1334
+ "type": "object",
1335
+ "properties": {
1336
+ "origin": {
1337
+ "type": "string",
1338
+ "description": "Origin airport or city code (e.g., JFK, NYC)"
1339
+ },
1340
+ "destination": {
1341
+ "type": "string",
1342
+ "description": "Destination airport or city code (e.g., LAX, LON)"
1343
+ },
1344
+ "depart_date": {
1345
+ "type": "string",
1346
+ "description": "Departure date in YYYY-MM-DD format"
1347
+ },
1348
+ "return_date": {
1349
+ "description": "Return date in YYYY-MM-DD format (round-trip only; omit for one-way)",
1350
+ "type": "string"
1351
+ },
1352
+ "trip_type": {
1353
+ "description": "Trip type (default OW for one-way, RT when return_date is set)",
1354
+ "type": "string",
1355
+ "enum": [
1356
+ "OW",
1357
+ "RT"
1358
+ ]
1359
+ },
1360
+ "cabin_class": {
1361
+ "description": "Cabin class (default ECONOMY)",
1362
+ "type": "string",
1363
+ "enum": [
1364
+ "ECONOMY",
1365
+ "PREMIUM",
1366
+ "BUSINESS",
1367
+ "FIRST"
1368
+ ]
1369
+ },
1370
+ "passengers": {
1371
+ "description": "Number of passengers (default 1)",
1372
+ "type": "integer",
1373
+ "minimum": 1,
1374
+ "maximum": 8
1375
+ }
1376
+ },
1377
+ "required": [
1378
+ "origin",
1379
+ "destination",
1380
+ "depart_date"
1381
+ ],
1382
+ "additionalProperties": false
1383
+ },
1384
+ "output_schema": {
1385
+ "type": "object",
1386
+ "properties": {
1387
+ "url": {
1388
+ "type": "string",
1389
+ "description": "The Priceline flight search URL that was opened"
1390
+ }
1391
+ },
1392
+ "required": [
1393
+ "url"
1394
+ ],
1395
+ "additionalProperties": false
1396
+ }
1397
+ },
865
1398
  {
866
1399
  "name": "get_customer_profile",
867
1400
  "displayName": "Get Customer Profile",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.84",
7
+ "version": "0.0.86",
8
8
  "type": "module",
9
9
  "main": "dist/adapter.iife.js",
10
10
  "keywords": [
@@ -50,13 +50,13 @@
50
50
  "zod": "^4.0.0"
51
51
  },
52
52
  "dependencies": {
53
- "@opentabs-dev/plugin-sdk": "^0.0.99"
53
+ "@opentabs-dev/plugin-sdk": "^0.0.107"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@biomejs/biome": "2.4.5",
57
- "@opentabs-dev/plugin-tools": "^0.0.99",
57
+ "@opentabs-dev/plugin-tools": "^0.0.107",
58
58
  "jiti": "^2.6.1",
59
- "typescript": "^5.9.3",
59
+ "typescript": "^6.0.3",
60
60
  "zod": "^4.0.0"
61
61
  },
62
62
  "repository": {