@nicertravel/sdk 0.0.0 → 1.0.0-beta.2

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 (270) hide show
  1. package/README.md +89 -3
  2. package/dist/_/codec.d.ts +93 -0
  3. package/dist/_/codec.js +298 -0
  4. package/dist/_/error.d.ts +27 -0
  5. package/dist/_/error.js +68 -0
  6. package/dist/_/hooks/envelope.d.ts +11 -0
  7. package/dist/_/hooks/envelope.js +15 -0
  8. package/dist/_/index.d.ts +3 -0
  9. package/dist/_/index.js +5 -0
  10. package/dist/_/transport.d.ts +146 -0
  11. package/dist/_/transport.js +220 -0
  12. package/dist/activities/client.d.ts +35 -0
  13. package/dist/activities/client.js +23 -0
  14. package/dist/activities/index.d.ts +5 -0
  15. package/dist/activities/index.js +4 -0
  16. package/dist/activities/models.d.ts +27 -0
  17. package/dist/activities/models.js +3 -0
  18. package/dist/activityDestinations/client.d.ts +24 -0
  19. package/dist/activityDestinations/client.js +17 -0
  20. package/dist/activityDestinations/index.d.ts +4 -0
  21. package/dist/activityDestinations/index.js +4 -0
  22. package/dist/balances/client.d.ts +29 -0
  23. package/dist/balances/client.js +18 -0
  24. package/dist/balances/index.d.ts +5 -0
  25. package/dist/balances/index.js +4 -0
  26. package/dist/balances/models.d.ts +12 -0
  27. package/dist/balances/models.js +3 -0
  28. package/dist/bookingSelections/client.d.ts +54 -0
  29. package/dist/bookingSelections/client.js +25 -0
  30. package/dist/bookingSelections/index.d.ts +5 -0
  31. package/dist/bookingSelections/index.js +4 -0
  32. package/dist/bookingSelections/models.d.ts +35 -0
  33. package/dist/bookingSelections/models.js +3 -0
  34. package/dist/carRentals/client.d.ts +55 -0
  35. package/dist/carRentals/client.js +25 -0
  36. package/dist/carRentals/index.d.ts +5 -0
  37. package/dist/carRentals/index.js +4 -0
  38. package/dist/carRentals/models.d.ts +157 -0
  39. package/dist/carRentals/models.js +3 -0
  40. package/dist/carriers/client.d.ts +32 -0
  41. package/dist/carriers/client.js +18 -0
  42. package/dist/carriers/index.d.ts +5 -0
  43. package/dist/carriers/index.js +4 -0
  44. package/dist/carriers/models.d.ts +9 -0
  45. package/dist/carriers/models.js +3 -0
  46. package/dist/chats/client.d.ts +69 -0
  47. package/dist/chats/client.js +38 -0
  48. package/dist/chats/index.d.ts +5 -0
  49. package/dist/chats/index.js +4 -0
  50. package/dist/chats/models.d.ts +25 -0
  51. package/dist/chats/models.js +3 -0
  52. package/dist/checkouts/client.d.ts +27 -0
  53. package/dist/checkouts/client.js +18 -0
  54. package/dist/checkouts/index.d.ts +5 -0
  55. package/dist/checkouts/index.js +4 -0
  56. package/dist/checkouts/models.d.ts +23 -0
  57. package/dist/checkouts/models.js +3 -0
  58. package/dist/client.d.ts +95 -0
  59. package/dist/client.js +220 -0
  60. package/dist/commissionExports/client.d.ts +62 -0
  61. package/dist/commissionExports/client.js +33 -0
  62. package/dist/commissionExports/index.d.ts +5 -0
  63. package/dist/commissionExports/index.js +4 -0
  64. package/dist/commissionExports/models.d.ts +165 -0
  65. package/dist/commissionExports/models.js +3 -0
  66. package/dist/commissionImports/client.d.ts +61 -0
  67. package/dist/commissionImports/client.js +34 -0
  68. package/dist/commissionImports/index.d.ts +5 -0
  69. package/dist/commissionImports/index.js +4 -0
  70. package/dist/commissionImports/models.d.ts +118 -0
  71. package/dist/commissionImports/models.js +3 -0
  72. package/dist/commissionItems/client.d.ts +128 -0
  73. package/dist/commissionItems/client.js +41 -0
  74. package/dist/commissionItems/index.d.ts +5 -0
  75. package/dist/commissionItems/index.js +4 -0
  76. package/dist/commissionItems/models.d.ts +217 -0
  77. package/dist/commissionItems/models.js +3 -0
  78. package/dist/commissionReports/client.d.ts +76 -0
  79. package/dist/commissionReports/client.js +18 -0
  80. package/dist/commissionReports/index.d.ts +5 -0
  81. package/dist/commissionReports/index.js +4 -0
  82. package/dist/commissionReports/models.d.ts +208 -0
  83. package/dist/commissionReports/models.js +3 -0
  84. package/dist/crmSettings/client.d.ts +50 -0
  85. package/dist/crmSettings/client.js +25 -0
  86. package/dist/crmSettings/index.d.ts +5 -0
  87. package/dist/crmSettings/index.js +4 -0
  88. package/dist/crmSettings/models.d.ts +313 -0
  89. package/dist/crmSettings/models.js +3 -0
  90. package/dist/earnings/client.d.ts +30 -0
  91. package/dist/earnings/client.js +18 -0
  92. package/dist/earnings/index.d.ts +5 -0
  93. package/dist/earnings/index.js +4 -0
  94. package/dist/earnings/models.d.ts +16 -0
  95. package/dist/earnings/models.js +3 -0
  96. package/dist/externalBookings/client.d.ts +56 -0
  97. package/dist/externalBookings/client.js +33 -0
  98. package/dist/externalBookings/index.d.ts +5 -0
  99. package/dist/externalBookings/index.js +4 -0
  100. package/dist/externalBookings/models.d.ts +93 -0
  101. package/dist/externalBookings/models.js +3 -0
  102. package/dist/externalPayments/client.d.ts +23 -0
  103. package/dist/externalPayments/client.js +18 -0
  104. package/dist/externalPayments/index.d.ts +5 -0
  105. package/dist/externalPayments/index.js +4 -0
  106. package/dist/externalPayments/models.d.ts +47 -0
  107. package/dist/externalPayments/models.js +3 -0
  108. package/dist/favorites/client.d.ts +87 -0
  109. package/dist/favorites/client.js +63 -0
  110. package/dist/favorites/index.d.ts +5 -0
  111. package/dist/favorites/index.js +4 -0
  112. package/dist/favorites/models.d.ts +79 -0
  113. package/dist/favorites/models.js +3 -0
  114. package/dist/flightSchedules/client.d.ts +29 -0
  115. package/dist/flightSchedules/client.js +18 -0
  116. package/dist/flightSchedules/index.d.ts +5 -0
  117. package/dist/flightSchedules/index.js +4 -0
  118. package/dist/flightSchedules/models.d.ts +25 -0
  119. package/dist/flightSchedules/models.js +3 -0
  120. package/dist/flights/client.d.ts +73 -0
  121. package/dist/flights/client.js +25 -0
  122. package/dist/flights/index.d.ts +5 -0
  123. package/dist/flights/index.js +4 -0
  124. package/dist/flights/models.d.ts +345 -0
  125. package/dist/flights/models.js +3 -0
  126. package/dist/hotels/client.d.ts +104 -0
  127. package/dist/hotels/client.js +26 -0
  128. package/dist/hotels/index.d.ts +5 -0
  129. package/dist/hotels/index.js +4 -0
  130. package/dist/hotels/models.d.ts +355 -0
  131. package/dist/hotels/models.js +3 -0
  132. package/dist/index.d.ts +5 -0
  133. package/dist/index.js +4 -0
  134. package/dist/insuranceQuotes/client.d.ts +27 -0
  135. package/dist/insuranceQuotes/client.js +18 -0
  136. package/dist/insuranceQuotes/index.d.ts +5 -0
  137. package/dist/insuranceQuotes/index.js +4 -0
  138. package/dist/insuranceQuotes/models.d.ts +76 -0
  139. package/dist/insuranceQuotes/models.js +3 -0
  140. package/dist/itineraries/client.d.ts +165 -0
  141. package/dist/itineraries/client.js +86 -0
  142. package/dist/itineraries/index.d.ts +5 -0
  143. package/dist/itineraries/index.js +4 -0
  144. package/dist/itineraries/models.d.ts +1619 -0
  145. package/dist/itineraries/models.js +4 -0
  146. package/dist/models.d.ts +1361 -0
  147. package/dist/models.js +3 -0
  148. package/dist/notes/client.d.ts +82 -0
  149. package/dist/notes/client.js +41 -0
  150. package/dist/notes/index.d.ts +5 -0
  151. package/dist/notes/index.js +4 -0
  152. package/dist/notes/models.d.ts +116 -0
  153. package/dist/notes/models.js +3 -0
  154. package/dist/offers/client.d.ts +27 -0
  155. package/dist/offers/client.js +17 -0
  156. package/dist/offers/index.d.ts +5 -0
  157. package/dist/offers/index.js +4 -0
  158. package/dist/offers/models.d.ts +19 -0
  159. package/dist/offers/models.js +3 -0
  160. package/dist/options/index.d.ts +114 -0
  161. package/dist/options/index.js +115 -0
  162. package/dist/orders/client.d.ts +154 -0
  163. package/dist/orders/client.js +65 -0
  164. package/dist/orders/index.d.ts +5 -0
  165. package/dist/orders/index.js +4 -0
  166. package/dist/orders/models.d.ts +2510 -0
  167. package/dist/orders/models.js +3 -0
  168. package/dist/payees/client.d.ts +48 -0
  169. package/dist/payees/client.js +26 -0
  170. package/dist/payees/index.d.ts +5 -0
  171. package/dist/payees/index.js +4 -0
  172. package/dist/payees/models.d.ts +50 -0
  173. package/dist/payees/models.js +3 -0
  174. package/dist/paymentMethods/client.d.ts +24 -0
  175. package/dist/paymentMethods/client.js +18 -0
  176. package/dist/paymentMethods/index.d.ts +5 -0
  177. package/dist/paymentMethods/index.js +4 -0
  178. package/dist/paymentMethods/models.d.ts +60 -0
  179. package/dist/paymentMethods/models.js +3 -0
  180. package/dist/places/client.d.ts +61 -0
  181. package/dist/places/client.js +25 -0
  182. package/dist/places/index.d.ts +5 -0
  183. package/dist/places/index.js +4 -0
  184. package/dist/places/models.d.ts +51 -0
  185. package/dist/places/models.js +3 -0
  186. package/dist/profileForms/client.d.ts +38 -0
  187. package/dist/profileForms/client.js +25 -0
  188. package/dist/profileForms/index.d.ts +5 -0
  189. package/dist/profileForms/index.js +4 -0
  190. package/dist/profileForms/models.d.ts +24 -0
  191. package/dist/profileForms/models.js +3 -0
  192. package/dist/quotes/client.d.ts +30 -0
  193. package/dist/quotes/client.js +18 -0
  194. package/dist/quotes/index.d.ts +5 -0
  195. package/dist/quotes/index.js +4 -0
  196. package/dist/quotes/models.d.ts +47 -0
  197. package/dist/quotes/models.js +3 -0
  198. package/dist/remittanceBatches/client.d.ts +78 -0
  199. package/dist/remittanceBatches/client.js +42 -0
  200. package/dist/remittanceBatches/index.d.ts +5 -0
  201. package/dist/remittanceBatches/index.js +4 -0
  202. package/dist/remittanceBatches/models.d.ts +131 -0
  203. package/dist/remittanceBatches/models.js +3 -0
  204. package/dist/remittanceClaims/client.d.ts +27 -0
  205. package/dist/remittanceClaims/client.js +18 -0
  206. package/dist/remittanceClaims/index.d.ts +5 -0
  207. package/dist/remittanceClaims/index.js +4 -0
  208. package/dist/remittanceClaims/models.d.ts +5 -0
  209. package/dist/remittanceClaims/models.js +3 -0
  210. package/dist/remittanceLines/client.d.ts +27 -0
  211. package/dist/remittanceLines/client.js +18 -0
  212. package/dist/remittanceLines/index.d.ts +5 -0
  213. package/dist/remittanceLines/index.js +4 -0
  214. package/dist/remittanceLines/models.d.ts +5 -0
  215. package/dist/remittanceLines/models.js +3 -0
  216. package/dist/remittances/client.d.ts +78 -0
  217. package/dist/remittances/client.js +42 -0
  218. package/dist/remittances/index.d.ts +5 -0
  219. package/dist/remittances/index.js +4 -0
  220. package/dist/remittances/models.d.ts +116 -0
  221. package/dist/remittances/models.js +3 -0
  222. package/dist/statements/client.d.ts +75 -0
  223. package/dist/statements/client.js +34 -0
  224. package/dist/statements/index.d.ts +5 -0
  225. package/dist/statements/index.js +4 -0
  226. package/dist/statements/models.d.ts +147 -0
  227. package/dist/statements/models.js +3 -0
  228. package/dist/suppliers/client.d.ts +71 -0
  229. package/dist/suppliers/client.js +41 -0
  230. package/dist/suppliers/index.d.ts +5 -0
  231. package/dist/suppliers/index.js +4 -0
  232. package/dist/suppliers/models.d.ts +130 -0
  233. package/dist/suppliers/models.js +3 -0
  234. package/dist/taskTemplates/client.d.ts +36 -0
  235. package/dist/taskTemplates/client.js +18 -0
  236. package/dist/taskTemplates/index.d.ts +5 -0
  237. package/dist/taskTemplates/index.js +4 -0
  238. package/dist/taskTemplates/models.d.ts +15 -0
  239. package/dist/taskTemplates/models.js +3 -0
  240. package/dist/tasks/client.d.ts +105 -0
  241. package/dist/tasks/client.js +41 -0
  242. package/dist/tasks/index.d.ts +5 -0
  243. package/dist/tasks/index.js +4 -0
  244. package/dist/tasks/models.d.ts +59 -0
  245. package/dist/tasks/models.js +3 -0
  246. package/dist/timeline/client.d.ts +42 -0
  247. package/dist/timeline/client.js +18 -0
  248. package/dist/timeline/index.d.ts +5 -0
  249. package/dist/timeline/index.js +4 -0
  250. package/dist/timeline/models.d.ts +65 -0
  251. package/dist/timeline/models.js +3 -0
  252. package/dist/travelProfile/client.d.ts +56 -0
  253. package/dist/travelProfile/client.js +25 -0
  254. package/dist/travelProfile/index.d.ts +5 -0
  255. package/dist/travelProfile/index.js +4 -0
  256. package/dist/travelProfile/models.d.ts +95 -0
  257. package/dist/travelProfile/models.js +3 -0
  258. package/dist/travelers/client.d.ts +214 -0
  259. package/dist/travelers/client.js +76 -0
  260. package/dist/travelers/index.d.ts +5 -0
  261. package/dist/travelers/index.js +4 -0
  262. package/dist/travelers/models.d.ts +576 -0
  263. package/dist/travelers/models.js +3 -0
  264. package/dist/trips/client.d.ts +224 -0
  265. package/dist/trips/client.js +88 -0
  266. package/dist/trips/index.d.ts +5 -0
  267. package/dist/trips/index.js +4 -0
  268. package/dist/trips/models.d.ts +486 -0
  269. package/dist/trips/models.js +3 -0
  270. package/package.json +35 -2
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -0,0 +1,73 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { AirportCode, CurrencyCode } from "../models.js";
3
+ import type { FlightDetailsResponse, FlightDiscoveryResponse, FlightSort } from "./models.js";
4
+ export interface ClientOptions extends BaseClientOptions {
5
+ /**
6
+ * The URL the paths of the API are relative to.
7
+ */
8
+ baseUrl: string;
9
+ }
10
+ export interface Client {
11
+ /**
12
+ * DiscoverFlightDetails
13
+ *
14
+ * JSON is the default; Accept: text/event-stream or format=stream requests
15
+ * SSE.
16
+ */
17
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
18
+ /**
19
+ * DiscoverFlights
20
+ *
21
+ * JSON is the default; Accept: text/event-stream or format=stream requests
22
+ * SSE.
23
+ */
24
+ search(request?: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
25
+ }
26
+ export declare function createClient(options: ClientOptions): Client;
27
+ export declare function bind(transport: Transport): Client;
28
+ export interface GetRequest {
29
+ offerReference: string;
30
+ }
31
+ export type GetResponse = FlightDetailsResponse;
32
+ export interface SearchRequest {
33
+ from?: AirportCode;
34
+ to?: AirportCode;
35
+ departure?: string;
36
+ return?: string;
37
+ legs?: string;
38
+ adults?: number;
39
+ children?: number;
40
+ infants?: number;
41
+ cabin?: "economy" | "premium-economy" | "business" | "first";
42
+ cabins?: string;
43
+ currency?: CurrencyCode;
44
+ airlines?: string;
45
+ stops?: string;
46
+ via?: string;
47
+ excludeAirportChanges?: "true" | "false";
48
+ maxConnections?: number;
49
+ minPrice?: number;
50
+ maxPrice?: number;
51
+ maxDuration?: number;
52
+ bags?: "true" | "false";
53
+ refundable?: "true" | "false";
54
+ commissionable?: "true" | "false";
55
+ sameCabin?: "true" | "false";
56
+ changeable?: "true" | "false";
57
+ maxLayover?: number;
58
+ departureTime?: string;
59
+ arrivalTime?: string;
60
+ /**
61
+ * How results are listed: best match, price (or -price), shortest duration,
62
+ * earliest (or latest, with -) departure or arrival, or fewest stops. best
63
+ * weighs 10% over the lowest price like 20% over the shortest duration or one
64
+ * more stop.
65
+ */
66
+ sort?: FlightSort;
67
+ page?: number;
68
+ size?: number;
69
+ group?: "slice";
70
+ slices?: string;
71
+ chosenFrom?: string;
72
+ }
73
+ export type SearchResponse = FlightDiscoveryResponse;
@@ -0,0 +1,25 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ get: (request, options) => transport.send(GetOperation, request, options),
10
+ search: (request, options) => transport.send(SearchOperation, request, options),
11
+ };
12
+ }
13
+ const GetOperation = {
14
+ method: "GET",
15
+ route: "/booking/flights/{offerReference}",
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true },
18
+ };
19
+ const SearchOperation = {
20
+ method: "GET",
21
+ route: "/booking/flights",
22
+ query: { from: "from", to: "to", departure: "departure", return: "return", legs: "legs", adults: "adults", children: "children", infants: "infants", cabin: "cabin", cabins: "cabins", currency: "currency", airlines: "airlines", stops: "stops", via: "via", excludeAirportChanges: "excludeAirportChanges", maxConnections: "maxConnections", minPrice: "minPrice", maxPrice: "maxPrice", maxDuration: "maxDuration", bags: "bags", refundable: "refundable", commissionable: "commissionable", sameCabin: "sameCabin", changeable: "changeable", maxLayover: "maxLayover", departureTime: "departureTime", arrivalTime: "arrivalTime", sort: "sort", page: "page", size: "size", group: "group", slices: "slices", chosenFrom: "chosenFrom" },
23
+ response: null,
24
+ errors: { "400": true, "401": true, "403": true },
25
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../_/index.js";
2
+ export type { RequestOptions } from "../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, SearchRequest, SearchResponse, } from "./client.js";
5
+ export type { FlightDetailsResponse, FlightDiscoveryGroup, FlightDiscoveryResponse, FlightFareOption, FlightMatrixCell, FlightMeal, FlightOffer, FlightSegment, FlightSort, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -0,0 +1,345 @@
1
+ import type { AirportCode, BaggageSize, BaggageWeight, CarrierCode, CountryCode, CurrencyCode, EstimatedCommission, FlightBaggageCharge, FlightRules, Money, PriceComponent, ProviderKey } from "../models.js";
2
+ export interface FlightDetailsResponse {
3
+ baggage: {
4
+ description?: string | null;
5
+ passengerReference: string;
6
+ pieces: number | null;
7
+ segmentReference: string;
8
+ size?: BaggageSize | null;
9
+ type: "CARRY_ON" | "CHECKED";
10
+ weight: BaggageWeight | null;
11
+ }[];
12
+ capabilities: {
13
+ ancillaries: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
14
+ seats: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
15
+ };
16
+ fareOptions: FlightFareOption[];
17
+ offer: FlightOffer | null;
18
+ previousPrice: {
19
+ breakdown: {
20
+ baseMinor: number | null;
21
+ discountMinor: number;
22
+ nicerAdjustmentMinor: number;
23
+ supplierFeesMinor: number | null;
24
+ taxesMinor: number | null;
25
+ };
26
+ currency: CurrencyCode;
27
+ totalMinor: number;
28
+ } | null;
29
+ reasonCode: string | null;
30
+ /**
31
+ * What changing or canceling costs before departure and, when filed, after
32
+ * it.
33
+ */
34
+ rules: FlightRules;
35
+ selectedOfferReference: string | null;
36
+ status: "OK" | "PRICE_CHANGED" | "UNAVAILABLE";
37
+ }
38
+ export interface FlightDiscoveryGroup {
39
+ optionCount: number;
40
+ priceDeltaMinor: number;
41
+ sliceIndex: number;
42
+ sliceReference: string;
43
+ }
44
+ export interface FlightDiscoveryResponse {
45
+ expiresAt: string;
46
+ fetchedAt: string;
47
+ filters: {
48
+ applied: {
49
+ airlineCodes?: CarrierCode[];
50
+ changeableOnly?: boolean;
51
+ checkedBaggageIncludedOnly?: boolean;
52
+ commissionableOnly?: boolean;
53
+ connectionAirportCodes?: AirportCode[];
54
+ excludeAirportChanges?: boolean;
55
+ maximumDurationMinutes?: number;
56
+ maximumLayoverMinutes?: number;
57
+ maximumPriceMinor?: number;
58
+ minimumPriceMinor?: number;
59
+ refundableOnly?: boolean;
60
+ sameCabinOnly?: boolean;
61
+ };
62
+ available: {
63
+ airlines: {
64
+ code: CarrierCode;
65
+ logoAssetReference: string | null;
66
+ name: string;
67
+ }[];
68
+ changeableCount?: number;
69
+ checkedBaggageIncludedCount: number;
70
+ commission: {
71
+ commissionableCount: number;
72
+ grossAmountRanges: {
73
+ currency: CurrencyCode;
74
+ maximumAmountMinor: number;
75
+ minimumAmountMinor: number;
76
+ }[];
77
+ } | null;
78
+ connectionAirports?: {
79
+ airport: {
80
+ city: string;
81
+ countryCode: CountryCode | null;
82
+ iataCode: AirportCode;
83
+ name: string;
84
+ timeZone: string | null;
85
+ };
86
+ flightCount: number;
87
+ }[];
88
+ connectionCounts: number[];
89
+ durationMinutes: {
90
+ maximum: number;
91
+ minimum: number;
92
+ } | null;
93
+ layoverMinutes?: {
94
+ maximum: number;
95
+ minimum: number;
96
+ } | null;
97
+ matrix?: FlightMatrixCell[];
98
+ priceRanges: {
99
+ currency: CurrencyCode;
100
+ maximumAmountMinor: number;
101
+ minimumAmountMinor: number;
102
+ }[];
103
+ refundableCount: number;
104
+ };
105
+ };
106
+ groups?: FlightDiscoveryGroup[];
107
+ items: FlightOffer[];
108
+ page: {
109
+ hasMore: boolean;
110
+ number: number;
111
+ size: number;
112
+ total: number;
113
+ };
114
+ }
115
+ export interface FlightFareOption {
116
+ baggage?: {
117
+ description?: string | null;
118
+ passengerReference: string;
119
+ pieces: number | null;
120
+ segmentReference: string;
121
+ size?: BaggageSize | null;
122
+ type: "CARRY_ON" | "CHECKED";
123
+ weight: BaggageWeight | null;
124
+ }[];
125
+ baggageCharges?: FlightBaggageCharge[];
126
+ brandName: string | null;
127
+ estimatedCommission: EstimatedCommission | null;
128
+ expiresAt: string;
129
+ fareBenefits: {
130
+ code: string;
131
+ description: string;
132
+ status: "CHARGEABLE" | "INCLUDED" | "NOT_OFFERED";
133
+ }[];
134
+ fareBenefitsAvailability: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
135
+ offerReference: string;
136
+ price: {
137
+ breakdown: {
138
+ baseMinor: number | null;
139
+ discountMinor: number;
140
+ nicerAdjustmentMinor: number;
141
+ supplierFeesMinor: number | null;
142
+ taxesMinor: number | null;
143
+ };
144
+ currency: CurrencyCode;
145
+ passengers: {
146
+ count: number;
147
+ passengerType: "ADULT" | "CHILD" | "INFANT";
148
+ totalMinor: number | null;
149
+ }[];
150
+ totalMinor: number;
151
+ };
152
+ refundable: boolean;
153
+ requiresInstantPayment: boolean;
154
+ /**
155
+ * What changing or canceling costs before departure and, when filed, after
156
+ * it.
157
+ */
158
+ rules?: FlightRules;
159
+ segmentFares: {
160
+ bookingCode: string | null;
161
+ brand: {
162
+ code: string;
163
+ name: string;
164
+ } | null;
165
+ cabin: "BUSINESS" | "ECONOMY" | "FIRST" | "PREMIUM_ECONOMY";
166
+ checkedBaggageIncluded?: boolean | null;
167
+ checkedBaggagePieces: number | null;
168
+ fareBasisCode: string | null;
169
+ meals?: FlightMeal[];
170
+ seatsLeft?: number | null;
171
+ }[][];
172
+ serviceCapabilities: {
173
+ ancillaries: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
174
+ seats: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
175
+ };
176
+ taxes?: PriceComponent[];
177
+ ticketingDeadline: string | null;
178
+ }
179
+ export interface FlightMatrixCell {
180
+ airline: {
181
+ code: CarrierCode;
182
+ logoAssetReference: string | null;
183
+ name: string;
184
+ } | null;
185
+ flightCount: number;
186
+ lowestPrice: Money;
187
+ stops: number;
188
+ }
189
+ /**
190
+ * What a booking class serves on board one flight, from the airline's IATA meal
191
+ * service codes.
192
+ */
193
+ export type FlightMeal = "BREAKFAST" | "DINNER" | "FOR_PURCHASE" | "LUNCH" | "MEAL" | "NONE" | "REFRESHMENTS" | "SNACK";
194
+ export interface FlightOffer {
195
+ cabin: "BUSINESS" | "ECONOMY" | "FIRST" | "PREMIUM_ECONOMY";
196
+ changeable?: boolean | null;
197
+ estimatedCommission?: EstimatedCommission | null;
198
+ expiresAt: string;
199
+ offerReference: string;
200
+ optionalDocumentTypes: ("PASSPORT" | "NATIONAL_ID" | "ALIEN_RESIDENT" | "VISA" | "KNOWN_TRAVELER_NUMBER" | "REDRESS_NUMBER")[];
201
+ owner: {
202
+ code: CarrierCode;
203
+ logoAssetReference: string | null;
204
+ name: string;
205
+ };
206
+ passengers: ({
207
+ count: number;
208
+ type: "ADULT";
209
+ } | {
210
+ count: number;
211
+ type: "CHILD";
212
+ } | {
213
+ count: number;
214
+ type: "INFANT";
215
+ })[];
216
+ price: {
217
+ breakdown: {
218
+ baseMinor: number | null;
219
+ discountMinor: number;
220
+ nicerAdjustmentMinor: number;
221
+ supplierFeesMinor: number | null;
222
+ taxesMinor: number | null;
223
+ };
224
+ currency: CurrencyCode;
225
+ passengers: {
226
+ count: number;
227
+ passengerType: "ADULT" | "CHILD" | "INFANT";
228
+ totalMinor: number | null;
229
+ }[];
230
+ totalMinor: number;
231
+ };
232
+ productKind: "FLIGHT";
233
+ providerKey: ProviderKey;
234
+ refundable: boolean;
235
+ requiredDocumentTypes: ("PASSPORT" | "NATIONAL_ID" | "ALIEN_RESIDENT" | "VISA" | "KNOWN_TRAVELER_NUMBER" | "REDRESS_NUMBER")[];
236
+ requiresInstantPayment: boolean;
237
+ serviceCapabilities: {
238
+ ancillaries: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
239
+ seats: "AVAILABLE" | "NOT_REQUESTED" | "NOT_SUPPORTED";
240
+ };
241
+ slices: {
242
+ connectionCount: number;
243
+ durationMinutes: number;
244
+ overnight: boolean;
245
+ segments: FlightSegment[];
246
+ sliceReference: string;
247
+ }[];
248
+ ticketingDeadline: string | null;
249
+ /**
250
+ * Every airline that may issue this fare's ticket, the default (`owner`)
251
+ * first. Present only when there is more than one; checkout takes the chosen
252
+ * code as `validatingCarrier`.
253
+ */
254
+ validatingCarriers?: {
255
+ code: CarrierCode;
256
+ logoAssetReference: string | null;
257
+ name: string;
258
+ }[];
259
+ }
260
+ export interface FlightSegment {
261
+ aircraft: {
262
+ code: string;
263
+ manufacturer: string | null;
264
+ model: string | null;
265
+ name: string;
266
+ } | null;
267
+ arrival: {
268
+ airport: {
269
+ city: string;
270
+ countryCode: CountryCode | null;
271
+ iataCode: AirportCode;
272
+ name: string;
273
+ timeZone: string | null;
274
+ };
275
+ at: string;
276
+ localDateTime: string;
277
+ terminal: string | null;
278
+ utcOffset: string | null;
279
+ };
280
+ codeshare: boolean;
281
+ departure: {
282
+ airport: {
283
+ city: string;
284
+ countryCode: CountryCode | null;
285
+ iataCode: AirportCode;
286
+ name: string;
287
+ timeZone: string | null;
288
+ };
289
+ at: string;
290
+ localDateTime: string;
291
+ terminal: string | null;
292
+ utcOffset: string | null;
293
+ };
294
+ distanceMiles: number | null;
295
+ durationMinutes: number;
296
+ fare: {
297
+ bookingCode: string | null;
298
+ brand: {
299
+ code: string;
300
+ name: string;
301
+ } | null;
302
+ cabin: "BUSINESS" | "ECONOMY" | "FIRST" | "PREMIUM_ECONOMY";
303
+ checkedBaggageIncluded?: boolean | null;
304
+ checkedBaggagePieces: number | null;
305
+ fareBasisCode: string | null;
306
+ meals?: FlightMeal[];
307
+ seatsLeft?: number | null;
308
+ };
309
+ flightNumber: string;
310
+ hiddenStops: {
311
+ airport: {
312
+ city: string;
313
+ countryCode: CountryCode | null;
314
+ iataCode: AirportCode;
315
+ name: string;
316
+ timeZone: string | null;
317
+ };
318
+ arrivalLocalDateTime: string;
319
+ arrivalUtcOffset: string | null;
320
+ arrivesAt: string;
321
+ departsAt: string;
322
+ departureLocalDateTime: string;
323
+ departureUtcOffset: string | null;
324
+ durationMinutes: number;
325
+ }[];
326
+ marketingCarrier: {
327
+ code: CarrierCode;
328
+ logoAssetReference: string | null;
329
+ name: string;
330
+ };
331
+ operatingCarrier: {
332
+ code: CarrierCode;
333
+ logoAssetReference: string | null;
334
+ name: string;
335
+ } | null;
336
+ operatingFlightNumber: string | null;
337
+ segmentReference: string;
338
+ }
339
+ /**
340
+ * How results are listed: best match, price (or -price), shortest duration,
341
+ * earliest (or latest, with -) departure or arrival, or fewest stops. best
342
+ * weighs 10% over the lowest price like 20% over the shortest duration or one
343
+ * more stop.
344
+ */
345
+ export type FlightSort = "best" | "price" | "-price" | "duration" | "departure" | "-departure" | "arrival" | "-arrival" | "stops";
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -0,0 +1,104 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { DiscoverHotelDetailsResponse, HotelDiscoveryResponse } from "./models.js";
3
+ export interface ClientOptions extends BaseClientOptions {
4
+ /**
5
+ * The URL the paths of the API are relative to.
6
+ */
7
+ baseUrl: string;
8
+ }
9
+ export interface Client {
10
+ /**
11
+ * DiscoverHotelDetails
12
+ *
13
+ * Public hotel API. Send x-nicer-company when an optional verified Cognito
14
+ * token does not identify one company. No trip or company-registration lookup
15
+ * is required. Accept selects JSON or SSE on this resource; repeat the same
16
+ * criteria URL after partial results. Search and details run in separate
17
+ * Lambdas. Hotel path identifiers are hotelReference values.
18
+ */
19
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
20
+ /**
21
+ * DiscoverHotels
22
+ *
23
+ * Public hotel API. Send x-nicer-company when an optional verified Cognito
24
+ * token does not identify one company. No trip or company-registration lookup
25
+ * is required. Accept selects JSON or SSE on this resource; repeat the same
26
+ * criteria URL after partial results. Search and details run in separate
27
+ * Lambdas. Hotel path identifiers are hotelReference values.
28
+ */
29
+ search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
30
+ }
31
+ export declare function createClient(options: ClientOptions): Client;
32
+ export declare function bind(transport: Transport): Client;
33
+ export interface GetRequest {
34
+ hotelId: string;
35
+ checkIn: string;
36
+ checkOut: string;
37
+ currency?: string;
38
+ /**
39
+ * Occupancy per room, not the room count. Format
40
+ * adults[:childAge,childAge];nextRoom. One room for 2 adults is '2'; two
41
+ * rooms for 2 adults each is '2;2'; 2 adults and a child age 7 is '2:7'.
42
+ * Sabre multi-room rates require the same adult and child counts per room.
43
+ * Search mixed occupancies separately; each result then covers only its
44
+ * requested room.
45
+ */
46
+ rooms?: string;
47
+ rateCodes?: string;
48
+ include?: "content" | "rates" | "content,rates";
49
+ refresh?: "true" | "false";
50
+ }
51
+ export type GetResponse = DiscoverHotelDetailsResponse;
52
+ export interface SearchRequest {
53
+ checkIn: string;
54
+ checkOut: string;
55
+ currency?: string;
56
+ /**
57
+ * Occupancy per room, not the room count. Format
58
+ * adults[:childAge,childAge];nextRoom. One room for 2 adults is '2'; two
59
+ * rooms for 2 adults each is '2;2'; 2 adults and a child age 7 is '2:7'.
60
+ * Sabre multi-room rates require the same adult and child counts per room.
61
+ * Search mixed occupancies separately; each result then covers only its
62
+ * requested room.
63
+ */
64
+ rooms?: string;
65
+ lat?: number;
66
+ lng?: number;
67
+ radius?: number;
68
+ placeId?: string;
69
+ /**
70
+ * Focused property or landmark name. When supplied, type is required: use
71
+ * type='hotel' for a hotel or type='landmark' for a nearby landmark.
72
+ */
73
+ name?: string;
74
+ /**
75
+ * Required together with name. Use 'hotel' for a named property and
76
+ * 'landmark' for proximity to a named landmark.
77
+ */
78
+ type?: "hotel" | "landmark";
79
+ sort?: "distance" | "price" | "-price" | "recommended";
80
+ rateCodes?: string;
81
+ amenities?: string;
82
+ chainNames?: string;
83
+ /**
84
+ * Comma-separated hotelReference values returned by prior hotel searches. Use
85
+ * this filter to compare the same known property across dates or occupancies;
86
+ * never invent references.
87
+ */
88
+ hotelReferences?: string;
89
+ maximumDistanceKm?: number;
90
+ maximumPriceMinor?: number;
91
+ minimumPriceMinor?: number;
92
+ minimumStars?: number;
93
+ maximumStars?: number;
94
+ breakfastIncludedOnly?: "true" | "false";
95
+ refundableOnly?: "true" | "false";
96
+ commissionableOnly?: "true" | "false";
97
+ requireRateCodeMatch?: "true" | "false";
98
+ expand?: "pins";
99
+ page?: number;
100
+ waitMs?: number;
101
+ size?: number;
102
+ minResults?: number;
103
+ }
104
+ export type SearchResponse = HotelDiscoveryResponse;
@@ -0,0 +1,26 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ get: (request, options) => transport.send(GetOperation, request, options),
10
+ search: (request, options) => transport.send(SearchOperation, request, options),
11
+ };
12
+ }
13
+ const GetOperation = {
14
+ method: "GET",
15
+ route: "/booking/hotels/{hotelId}",
16
+ query: { checkIn: "checkIn", checkOut: "checkOut", currency: "currency", rooms: "rooms", rateCodes: "rateCodes", include: "include", refresh: "refresh" },
17
+ response: null,
18
+ errors: { "400": true, "401": true, "403": true },
19
+ };
20
+ const SearchOperation = {
21
+ method: "GET",
22
+ route: "/booking/hotels",
23
+ query: { checkIn: "checkIn", checkOut: "checkOut", currency: "currency", rooms: "rooms", lat: "lat", lng: "lng", radius: "radius", placeId: "placeId", name: "name", type: "type", sort: "sort", rateCodes: "rateCodes", amenities: "amenities", chainNames: "chainNames", hotelReferences: "hotelReferences", maximumDistanceKm: "maximumDistanceKm", maximumPriceMinor: "maximumPriceMinor", minimumPriceMinor: "minimumPriceMinor", minimumStars: "minimumStars", maximumStars: "maximumStars", breakfastIncludedOnly: "breakfastIncludedOnly", refundableOnly: "refundableOnly", commissionableOnly: "commissionableOnly", requireRateCodeMatch: "requireRateCodeMatch", expand: "expand", page: "page", waitMs: "waitMs", size: "size", minResults: "minResults" },
24
+ response: null,
25
+ errors: { "400": true, "401": true, "403": true },
26
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../_/index.js";
2
+ export type { RequestOptions } from "../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, SearchRequest, SearchResponse, } from "./client.js";
5
+ export type { DiscoverHotelDetailsResponse, HotelDetailsResponse, HotelDiscoveryResponse, HotelRatesResponse, HotelStayOffer, HotelSummary, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../_/index.js";
4
+ export { createClient } from "./client.js";