@nicertravel/sdk 1.0.0-beta.1 → 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 (228) hide show
  1. package/dist/activities/client.d.ts +35 -0
  2. package/dist/activities/client.js +23 -0
  3. package/dist/activities/index.d.ts +5 -0
  4. package/dist/activities/models.d.ts +27 -0
  5. package/dist/activityDestinations/client.d.ts +24 -0
  6. package/dist/activityDestinations/client.js +17 -0
  7. package/dist/activityDestinations/index.d.ts +4 -0
  8. package/dist/balances/client.d.ts +29 -0
  9. package/dist/balances/client.js +18 -0
  10. package/dist/balances/index.d.ts +5 -0
  11. package/dist/balances/models.d.ts +12 -0
  12. package/dist/bookingSelections/client.d.ts +54 -0
  13. package/dist/bookingSelections/client.js +25 -0
  14. package/dist/bookingSelections/index.d.ts +5 -0
  15. package/dist/{crmTrips/travelers → bookingSelections}/index.js +1 -1
  16. package/dist/bookingSelections/models.d.ts +35 -0
  17. package/dist/carRentals/client.d.ts +55 -0
  18. package/dist/carRentals/client.js +25 -0
  19. package/dist/carRentals/index.d.ts +5 -0
  20. package/dist/carRentals/index.js +4 -0
  21. package/dist/carRentals/models.d.ts +157 -0
  22. package/dist/carriers/client.d.ts +32 -0
  23. package/dist/carriers/client.js +18 -0
  24. package/dist/carriers/index.d.ts +5 -0
  25. package/dist/carriers/index.js +4 -0
  26. package/dist/carriers/models.d.ts +9 -0
  27. package/dist/carriers/models.js +3 -0
  28. package/dist/chats/client.d.ts +69 -0
  29. package/dist/chats/client.js +38 -0
  30. package/dist/chats/index.d.ts +5 -0
  31. package/dist/chats/index.js +4 -0
  32. package/dist/chats/models.d.ts +25 -0
  33. package/dist/chats/models.js +3 -0
  34. package/dist/checkouts/client.d.ts +27 -0
  35. package/dist/{crmTrips/travelers → checkouts}/client.js +4 -4
  36. package/dist/checkouts/index.d.ts +5 -0
  37. package/dist/checkouts/index.js +4 -0
  38. package/dist/checkouts/models.d.ts +23 -0
  39. package/dist/checkouts/models.js +3 -0
  40. package/dist/client.d.ts +73 -1658
  41. package/dist/client.js +178 -707
  42. package/dist/commissionExports/client.d.ts +62 -0
  43. package/dist/{crmTrips → commissionExports}/client.js +11 -16
  44. package/dist/commissionExports/index.d.ts +5 -0
  45. package/dist/commissionExports/index.js +4 -0
  46. package/dist/commissionExports/models.d.ts +165 -0
  47. package/dist/commissionExports/models.js +3 -0
  48. package/dist/commissionImports/client.d.ts +61 -0
  49. package/dist/commissionImports/client.js +34 -0
  50. package/dist/commissionImports/index.d.ts +5 -0
  51. package/dist/commissionImports/index.js +4 -0
  52. package/dist/commissionImports/models.d.ts +118 -0
  53. package/dist/commissionImports/models.js +3 -0
  54. package/dist/commissionItems/client.d.ts +128 -0
  55. package/dist/commissionItems/client.js +41 -0
  56. package/dist/commissionItems/index.d.ts +5 -0
  57. package/dist/commissionItems/index.js +4 -0
  58. package/dist/commissionItems/models.d.ts +217 -0
  59. package/dist/commissionItems/models.js +3 -0
  60. package/dist/commissionReports/client.d.ts +76 -0
  61. package/dist/commissionReports/client.js +18 -0
  62. package/dist/commissionReports/index.d.ts +5 -0
  63. package/dist/commissionReports/index.js +4 -0
  64. package/dist/commissionReports/models.d.ts +208 -0
  65. package/dist/commissionReports/models.js +3 -0
  66. package/dist/earnings/client.d.ts +30 -0
  67. package/dist/earnings/client.js +18 -0
  68. package/dist/earnings/index.d.ts +5 -0
  69. package/dist/earnings/index.js +4 -0
  70. package/dist/earnings/models.d.ts +16 -0
  71. package/dist/earnings/models.js +3 -0
  72. package/dist/externalBookings/client.d.ts +56 -0
  73. package/dist/externalBookings/client.js +33 -0
  74. package/dist/externalBookings/index.d.ts +5 -0
  75. package/dist/externalBookings/index.js +4 -0
  76. package/dist/externalBookings/models.d.ts +93 -0
  77. package/dist/externalBookings/models.js +3 -0
  78. package/dist/externalPayments/client.d.ts +23 -0
  79. package/dist/externalPayments/client.js +18 -0
  80. package/dist/externalPayments/index.d.ts +5 -0
  81. package/dist/externalPayments/index.js +4 -0
  82. package/dist/externalPayments/models.d.ts +47 -0
  83. package/dist/externalPayments/models.js +3 -0
  84. package/dist/favorites/client.d.ts +87 -0
  85. package/dist/favorites/client.js +63 -0
  86. package/dist/favorites/index.d.ts +5 -0
  87. package/dist/favorites/index.js +4 -0
  88. package/dist/favorites/models.d.ts +79 -0
  89. package/dist/favorites/models.js +3 -0
  90. package/dist/flightSchedules/client.d.ts +29 -0
  91. package/dist/flightSchedules/client.js +18 -0
  92. package/dist/flightSchedules/index.d.ts +5 -0
  93. package/dist/flightSchedules/index.js +4 -0
  94. package/dist/flightSchedules/models.d.ts +25 -0
  95. package/dist/flightSchedules/models.js +3 -0
  96. package/dist/flights/client.d.ts +73 -0
  97. package/dist/flights/client.js +25 -0
  98. package/dist/flights/index.d.ts +5 -0
  99. package/dist/flights/index.js +4 -0
  100. package/dist/flights/models.d.ts +345 -0
  101. package/dist/flights/models.js +3 -0
  102. package/dist/hotels/client.d.ts +104 -0
  103. package/dist/hotels/client.js +26 -0
  104. package/dist/hotels/index.d.ts +5 -0
  105. package/dist/hotels/index.js +4 -0
  106. package/dist/hotels/models.d.ts +355 -0
  107. package/dist/hotels/models.js +3 -0
  108. package/dist/index.d.ts +2 -2
  109. package/dist/insuranceQuotes/client.d.ts +27 -0
  110. package/dist/insuranceQuotes/client.js +18 -0
  111. package/dist/insuranceQuotes/index.d.ts +5 -0
  112. package/dist/insuranceQuotes/index.js +4 -0
  113. package/dist/insuranceQuotes/models.d.ts +76 -0
  114. package/dist/insuranceQuotes/models.js +3 -0
  115. package/dist/itineraries/client.d.ts +165 -0
  116. package/dist/itineraries/client.js +86 -0
  117. package/dist/itineraries/index.d.ts +5 -0
  118. package/dist/itineraries/index.js +4 -0
  119. package/dist/itineraries/models.d.ts +1619 -0
  120. package/dist/itineraries/models.js +4 -0
  121. package/dist/models.d.ts +25 -7203
  122. package/dist/models.js +1 -2
  123. package/dist/offers/client.d.ts +27 -0
  124. package/dist/offers/client.js +17 -0
  125. package/dist/offers/index.d.ts +5 -0
  126. package/dist/offers/index.js +4 -0
  127. package/dist/offers/models.d.ts +19 -0
  128. package/dist/offers/models.js +3 -0
  129. package/dist/options/index.d.ts +2 -2
  130. package/dist/options/index.js +2 -2
  131. package/dist/orders/client.d.ts +154 -0
  132. package/dist/orders/client.js +65 -0
  133. package/dist/orders/index.d.ts +5 -0
  134. package/dist/orders/index.js +4 -0
  135. package/dist/orders/models.d.ts +2510 -0
  136. package/dist/orders/models.js +3 -0
  137. package/dist/payees/client.d.ts +48 -0
  138. package/dist/payees/client.js +26 -0
  139. package/dist/payees/index.d.ts +5 -0
  140. package/dist/payees/index.js +4 -0
  141. package/dist/payees/models.d.ts +50 -0
  142. package/dist/payees/models.js +3 -0
  143. package/dist/paymentMethods/client.d.ts +24 -0
  144. package/dist/paymentMethods/client.js +18 -0
  145. package/dist/paymentMethods/index.d.ts +5 -0
  146. package/dist/paymentMethods/index.js +4 -0
  147. package/dist/paymentMethods/models.d.ts +60 -0
  148. package/dist/paymentMethods/models.js +3 -0
  149. package/dist/places/client.d.ts +61 -0
  150. package/dist/places/client.js +25 -0
  151. package/dist/places/index.d.ts +5 -0
  152. package/dist/places/index.js +4 -0
  153. package/dist/places/models.d.ts +51 -0
  154. package/dist/places/models.js +3 -0
  155. package/dist/quotes/client.d.ts +30 -0
  156. package/dist/quotes/client.js +18 -0
  157. package/dist/quotes/index.d.ts +5 -0
  158. package/dist/quotes/index.js +4 -0
  159. package/dist/quotes/models.d.ts +47 -0
  160. package/dist/quotes/models.js +3 -0
  161. package/dist/remittanceBatches/client.d.ts +78 -0
  162. package/dist/remittanceBatches/client.js +42 -0
  163. package/dist/remittanceBatches/index.d.ts +5 -0
  164. package/dist/remittanceBatches/index.js +4 -0
  165. package/dist/remittanceBatches/models.d.ts +131 -0
  166. package/dist/remittanceBatches/models.js +3 -0
  167. package/dist/remittanceClaims/client.d.ts +27 -0
  168. package/dist/remittanceClaims/client.js +18 -0
  169. package/dist/remittanceClaims/index.d.ts +5 -0
  170. package/dist/remittanceClaims/index.js +4 -0
  171. package/dist/remittanceClaims/models.d.ts +5 -0
  172. package/dist/remittanceClaims/models.js +3 -0
  173. package/dist/remittanceLines/client.d.ts +27 -0
  174. package/dist/remittanceLines/client.js +18 -0
  175. package/dist/remittanceLines/index.d.ts +5 -0
  176. package/dist/remittanceLines/index.js +4 -0
  177. package/dist/remittanceLines/models.d.ts +5 -0
  178. package/dist/remittanceLines/models.js +3 -0
  179. package/dist/remittances/client.d.ts +78 -0
  180. package/dist/remittances/client.js +42 -0
  181. package/dist/remittances/index.d.ts +5 -0
  182. package/dist/remittances/index.js +4 -0
  183. package/dist/remittances/models.d.ts +116 -0
  184. package/dist/remittances/models.js +3 -0
  185. package/dist/statements/client.d.ts +75 -0
  186. package/dist/statements/client.js +34 -0
  187. package/dist/statements/index.d.ts +5 -0
  188. package/dist/statements/index.js +4 -0
  189. package/dist/statements/models.d.ts +147 -0
  190. package/dist/statements/models.js +3 -0
  191. package/dist/suppliers/client.d.ts +71 -0
  192. package/dist/suppliers/client.js +41 -0
  193. package/dist/suppliers/index.d.ts +5 -0
  194. package/dist/suppliers/index.js +4 -0
  195. package/dist/suppliers/models.d.ts +130 -0
  196. package/dist/suppliers/models.js +3 -0
  197. package/dist/timeline/index.js +4 -0
  198. package/dist/timeline/models.js +3 -0
  199. package/dist/travelProfile/index.js +4 -0
  200. package/dist/travelProfile/models.js +3 -0
  201. package/dist/trips/client.d.ts +224 -0
  202. package/dist/trips/client.js +88 -0
  203. package/dist/trips/index.d.ts +5 -0
  204. package/dist/trips/index.js +4 -0
  205. package/dist/trips/models.d.ts +486 -0
  206. package/dist/trips/models.js +3 -0
  207. package/package.json +2 -2
  208. package/dist/crmTrips/client.d.ts +0 -100
  209. package/dist/crmTrips/index.d.ts +0 -5
  210. package/dist/crmTrips/models.d.ts +0 -193
  211. package/dist/crmTrips/travelers/client.d.ts +0 -33
  212. package/dist/crmTrips/travelers/index.d.ts +0 -5
  213. package/dist/crmTrips/travelers/models.d.ts +0 -14
  214. /package/dist/{activity → activities}/index.js +0 -0
  215. /package/dist/{activity → activities}/models.js +0 -0
  216. /package/dist/{crmTrips → activityDestinations}/index.js +0 -0
  217. /package/dist/{me → balances}/index.js +0 -0
  218. /package/dist/{crmTrips → balances}/models.js +0 -0
  219. /package/dist/{crmTrips/travelers → bookingSelections}/models.js +0 -0
  220. /package/dist/{me → carRentals}/models.js +0 -0
  221. /package/dist/{activity → timeline}/client.d.ts +0 -0
  222. /package/dist/{activity → timeline}/client.js +0 -0
  223. /package/dist/{activity → timeline}/index.d.ts +0 -0
  224. /package/dist/{activity → timeline}/models.d.ts +0 -0
  225. /package/dist/{me → travelProfile}/client.d.ts +0 -0
  226. /package/dist/{me → travelProfile}/client.js +0 -0
  227. /package/dist/{me → travelProfile}/index.d.ts +0 -0
  228. /package/dist/{me → travelProfile}/models.d.ts +0 -0
@@ -0,0 +1,35 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { SearchProductsBody } 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
+ * Get a tour or activity
12
+ *
13
+ * Returns one the activities provider product by its product code, shaped as
14
+ * an itinerary activity segment. Because the provider's detail call carries
15
+ * no pricing, pass the price seen in search results to have it preserved on
16
+ * the segment.
17
+ */
18
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
19
+ /**
20
+ * Search tours and activities
21
+ *
22
+ * Searches the the activities provider catalogue for tours and activities and
23
+ * returns them already shaped as itinerary activity segments, with paging and
24
+ * the currency the prices are quoted in.
25
+ */
26
+ search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
27
+ }
28
+ export declare function createClient(options: ClientOptions): Client;
29
+ export declare function bind(transport: Transport): Client;
30
+ export interface GetRequest {
31
+ productCode: string;
32
+ }
33
+ export type GetResponse = void;
34
+ export type SearchRequest = SearchProductsBody;
35
+ export type SearchResponse = void;
@@ -0,0 +1,23 @@
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: "/tour-viator/products/{productCode}",
16
+ errors: { "400": true, "401": true, "403": true },
17
+ };
18
+ const SearchOperation = {
19
+ method: "POST",
20
+ route: "/tour-viator/products",
21
+ body: "flat",
22
+ errors: { "400": true, "401": true, "403": true },
23
+ };
@@ -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 { SearchProductsBody } from "./models.js";
@@ -0,0 +1,27 @@
1
+ export interface SearchProductsBody {
2
+ currency?: string;
3
+ dates?: {
4
+ endDate: string;
5
+ startDate: string;
6
+ };
7
+ destinationId: string;
8
+ filters?: {
9
+ duration?: {
10
+ maxMinutes?: number;
11
+ minMinutes?: number;
12
+ };
13
+ flags?: ("NEW_ON_VIATOR" | "FREE_CANCELLATION" | "SKIP_THE_LINE" | "PRIVATE_TOUR" | "SPECIAL_OFFER" | "LIKELY_TO_SELL_OUT")[];
14
+ priceRange?: {
15
+ max?: number;
16
+ min?: number;
17
+ };
18
+ };
19
+ pagination?: {
20
+ page?: number;
21
+ pageSize?: number;
22
+ };
23
+ sort?: {
24
+ direction: "asc" | "desc";
25
+ field: "price" | "recommended";
26
+ };
27
+ }
@@ -0,0 +1,24 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ export interface ClientOptions extends BaseClientOptions {
3
+ /**
4
+ * The URL the paths of the API are relative to.
5
+ */
6
+ baseUrl: string;
7
+ }
8
+ export interface Client {
9
+ /**
10
+ * Search tour destinations
11
+ *
12
+ * Text search over the activities provider destinations, optionally bounded
13
+ * by a radius, used to anchor an activity search to a place.
14
+ */
15
+ search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
16
+ }
17
+ export declare function createClient(options: ClientOptions): Client;
18
+ export declare function bind(transport: Transport): Client;
19
+ export interface SearchRequest {
20
+ query: string;
21
+ radiusKm?: number;
22
+ limit?: number;
23
+ }
24
+ export type SearchResponse = void;
@@ -0,0 +1,17 @@
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
+ search: (request, options) => transport.send(SearchOperation, request, options),
10
+ };
11
+ }
12
+ const SearchOperation = {
13
+ method: "GET",
14
+ route: "/tour-viator/destinations",
15
+ query: { query: "query", radiusKm: "radiusKm", limit: "limit" },
16
+ errors: { "400": true, "401": true, "403": true },
17
+ };
@@ -0,0 +1,4 @@
1
+ export { ApiError } from "../_/index.js";
2
+ export type { RequestOptions } from "../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, SearchRequest, SearchResponse, } from "./client.js";
@@ -0,0 +1,29 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { BalancesGetResponse } 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
+ * Get account balances
12
+ *
13
+ * Returns the company's ledger balances by beneficiary and currency,
14
+ * optionally narrowed to one beneficiary or to a beneficiary kind (advisor,
15
+ * company, traveler or the platform). A bucket below zero is money still
16
+ * owed: it counts as receivable, never as a negative balance. Advisors and
17
+ * travelers see their own; admins anyone's of the company, and Nicer staff
18
+ * anyone's of the company they name in `x-nicer-company` (each staff read is
19
+ * audited).
20
+ */
21
+ list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
22
+ }
23
+ export declare function createClient(options: ClientOptions): Client;
24
+ export declare function bind(transport: Transport): Client;
25
+ export interface ListRequest {
26
+ beneficiaryId?: string;
27
+ beneficiaryKind?: "ADVISOR" | "COMPANY" | "NICER" | "TRAVELER";
28
+ }
29
+ export type ListResponse = BalancesGetResponse;
@@ -0,0 +1,18 @@
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
+ list: (request, options) => transport.send(ListOperation, request, options),
10
+ };
11
+ }
12
+ const ListOperation = {
13
+ method: "GET",
14
+ route: "/commerce/finance/balances",
15
+ query: { beneficiaryId: "beneficiaryId", beneficiaryKind: "beneficiaryKind" },
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true },
18
+ };
@@ -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, ListRequest, ListResponse, } from "./client.js";
5
+ export type { BalancesGetResponse } from "./models.js";
@@ -0,0 +1,12 @@
1
+ import type { CurrencyCode } from "../models.js";
2
+ export interface BalancesGetResponse {
3
+ balances: {
4
+ accountCode: string;
5
+ availableMinor: number;
6
+ beneficiaryId: string | null;
7
+ beneficiaryKind: "ADVISOR" | "COMPANY" | "NICER" | "TRAVELER";
8
+ currency: CurrencyCode;
9
+ pendingMinor: number;
10
+ receivableMinor: number;
11
+ }[];
12
+ }
@@ -0,0 +1,54 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { CreateBookingSelectionBody, CreateBookingSelectionResponse, GetBookingSelectionResponse } 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
+ * Save an offer as a booking selection
12
+ *
13
+ * Re-validates a live search offer with the provider and stores it as a
14
+ * selection that stays bookable until `bookableUntil` (retained 30 days).
15
+ * Requires an authenticated company user and an `Idempotency-Key`; replaying
16
+ * the key with a different body returns 409
17
+ * `BOOKING_SELECTION_IDEMPOTENCY_CONFLICT`, an expired or unknown offer
18
+ * returns 409 `BOOKING_OFFER_UNAVAILABLE`, and a Sabre offer with no DK to
19
+ * book with (the advisor has none and the agency has no default DK) returns
20
+ * 422 `BOOKING_SABRE_DK_REQUIRED`. Returns the selection id and a preview of
21
+ * product, price and payment terms; the preview carries the commercial
22
+ * snapshot (expected commission and earnings) only for the agency's advisors
23
+ * and admins and for Nicer staff, and leaves it out for travelers.
24
+ */
25
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
26
+ /**
27
+ * Read and re-price a booking selection
28
+ *
29
+ * Returns a stored selection and, when the last refresh is older than 15
30
+ * minutes, re-prices it against the provider, persists the new price and
31
+ * expiry, and projects them onto the linked itinerary item. Any refresh
32
+ * failure still serves the last stored offer; only a provider that no longer
33
+ * offers the product sets `availability` to `UNAVAILABLE`. Readable by
34
+ * whoever may open the trip it belongs to: the trip's travelers, its advisor
35
+ * of record (the assigned advisor, or the primary traveler of a self-booked
36
+ * trip without one), the agency's admins and Nicer staff; a selection outside
37
+ * any trip by the person who saved it, the agency's admins and Nicer staff.
38
+ * The preview carries the commercial snapshot (expected commission and
39
+ * earnings) only for the agency's advisors and admins and for Nicer staff.
40
+ * Returns 404 `BOOKING_SELECTION_NOT_FOUND` when missing, expired or not
41
+ * readable by the caller, checked before any provider call, and 409
42
+ * `BOOKING_SELECTION_TRAVEL_PAST` once the travel dates are more than a day
43
+ * past.
44
+ */
45
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
46
+ }
47
+ export declare function createClient(options: ClientOptions): Client;
48
+ export declare function bind(transport: Transport): Client;
49
+ export type CreateRequest = CreateBookingSelectionBody;
50
+ export type CreateResponse = CreateBookingSelectionResponse;
51
+ export interface GetRequest {
52
+ selectionId: string;
53
+ }
54
+ export type GetResponse = GetBookingSelectionResponse;
@@ -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
+ create: (request, options) => transport.send(CreateOperation, request, options),
10
+ get: (request, options) => transport.send(GetOperation, request, options),
11
+ };
12
+ }
13
+ const CreateOperation = {
14
+ method: "POST",
15
+ route: "/booking/selections",
16
+ body: "flat",
17
+ response: null,
18
+ errors: { "400": true, "401": true, "403": true },
19
+ };
20
+ const GetOperation = {
21
+ method: "GET",
22
+ route: "/booking/selections/{selectionId}",
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, CreateRequest, CreateResponse, GetRequest, GetResponse, } from "./client.js";
5
+ export type { BookingSelectionPreviewResponse, CreateBookingSelectionBody, CreateBookingSelectionResponse, GetBookingSelectionResponse, } from "./models.js";
@@ -1,4 +1,4 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- export { ApiError } from "../../_/index.js";
3
+ export { ApiError } from "../_/index.js";
4
4
  export { createClient } from "./client.js";
@@ -0,0 +1,35 @@
1
+ import type { BookingCommercialSnapshot, BookingPriceSnapshot, BookingProductSnapshot, PaymentTerms } from "../models.js";
2
+ export interface BookingSelectionPreviewResponse {
3
+ /**
4
+ * Expected supplier commission, advisor earning and traveler reward, with
5
+ * their calculation inputs. Present only for the agency's advisors and admins
6
+ * and for Nicer staff; absent for travelers.
7
+ */
8
+ commercialSnapshot?: BookingCommercialSnapshot;
9
+ paymentTerms: PaymentTerms;
10
+ priceSnapshot: BookingPriceSnapshot;
11
+ productSnapshot: BookingProductSnapshot;
12
+ }
13
+ export interface CreateBookingSelectionBody {
14
+ itineraryItemId?: string;
15
+ offerReference: string;
16
+ travelersTripId?: string;
17
+ }
18
+ export interface CreateBookingSelectionResponse {
19
+ bookableUntil: string;
20
+ itineraryItemId: string | null;
21
+ offerExpiresAt: string | null;
22
+ preview: BookingSelectionPreviewResponse;
23
+ selectionId: string;
24
+ travelersTripId: string | null;
25
+ }
26
+ export interface GetBookingSelectionResponse {
27
+ availability: "LIVE" | "UNAVAILABLE";
28
+ bookableUntil: string;
29
+ itineraryItemId: string | null;
30
+ offerExpiresAt: string | null;
31
+ preview: BookingSelectionPreviewResponse;
32
+ refreshedAt: string | null;
33
+ selectionId: string;
34
+ travelersTripId: string | null;
35
+ }
@@ -0,0 +1,55 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { CurrencyCode } from "../models.js";
3
+ import type { CarDiscoveryDetails, CarDiscoveryResponse } 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
+ * DiscoverCarRentalDetails
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
+ * DiscoverCarRentals
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 = CarDiscoveryDetails;
32
+ export interface SearchRequest {
33
+ pickup: string;
34
+ dropoff?: string;
35
+ pickupDate: string;
36
+ dropoffDate: string;
37
+ pickupTime?: string;
38
+ dropoffTime?: string;
39
+ pickupZone?: string;
40
+ dropoffZone?: string;
41
+ age?: number;
42
+ currency?: CurrencyCode;
43
+ suppliers?: string;
44
+ transmission?: string;
45
+ extras?: string;
46
+ minPrice?: number;
47
+ maxPrice?: number;
48
+ minLuggage?: number;
49
+ minCargo?: number;
50
+ minSeats?: number;
51
+ sort?: "price" | "-price" | "commission" | "-commission";
52
+ page?: number;
53
+ size?: number;
54
+ }
55
+ export type SearchResponse = CarDiscoveryResponse;
@@ -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/car-rentals/{offerReference}",
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true },
18
+ };
19
+ const SearchOperation = {
20
+ method: "GET",
21
+ route: "/booking/car-rentals",
22
+ query: { pickup: "pickup", dropoff: "dropoff", pickupDate: "pickupDate", dropoffDate: "dropoffDate", pickupTime: "pickupTime", dropoffTime: "dropoffTime", pickupZone: "pickupZone", dropoffZone: "dropoffZone", age: "age", currency: "currency", suppliers: "suppliers", transmission: "transmission", extras: "extras", minPrice: "minPrice", maxPrice: "maxPrice", minLuggage: "minLuggage", minCargo: "minCargo", minSeats: "minSeats", sort: "sort", page: "page", size: "size" },
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 { CarDiscoveryDetails, CarDiscoveryResponse, CarRentalOffer, } 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,157 @@
1
+ import type { CurrencyCode, EstimatedCommission, Money, ProviderKey } from "../models.js";
2
+ export interface CarDiscoveryDetails {
3
+ offer: CarRentalOffer | null;
4
+ previousPrice: {
5
+ breakdown: {
6
+ baseMinor: number | null;
7
+ discountMinor: number;
8
+ nicerAdjustmentMinor: number;
9
+ supplierFeesMinor: number | null;
10
+ taxesMinor: number | null;
11
+ };
12
+ currency: CurrencyCode;
13
+ totalMinor: number;
14
+ } | null;
15
+ reasonCode: string | null;
16
+ status: "OK" | "PRICE_CHANGED" | "UNAVAILABLE";
17
+ }
18
+ export interface CarDiscoveryResponse {
19
+ expiresAt: string;
20
+ fetchedAt: string;
21
+ filters: {
22
+ applied: {
23
+ extras: string[];
24
+ maximumPriceMinor?: number;
25
+ minimumCargo?: number;
26
+ minimumLuggage?: number;
27
+ minimumPriceMinor?: number;
28
+ minimumSeats?: number;
29
+ supplierCodes: string[];
30
+ transmission: ("AUTOMATIC" | "MANUAL")[];
31
+ };
32
+ available: {
33
+ extras: {
34
+ code: string;
35
+ name: string;
36
+ }[];
37
+ maximumCargo: number | null;
38
+ maximumLuggage: number | null;
39
+ maximumSeats: number | null;
40
+ price: {
41
+ currency: CurrencyCode;
42
+ maximumMinor: number;
43
+ minimumMinor: number;
44
+ } | null;
45
+ suppliers: {
46
+ code: string;
47
+ name: string;
48
+ }[];
49
+ transmission: string[];
50
+ };
51
+ };
52
+ items: CarRentalOffer[];
53
+ page: {
54
+ hasMore: boolean;
55
+ number: number;
56
+ size: number;
57
+ total: number;
58
+ };
59
+ }
60
+ export interface CarRentalOffer {
61
+ availabilityStatus: string | null;
62
+ cancellation: {
63
+ allowed: boolean | null;
64
+ deadline: string | null;
65
+ penalty: Money | null;
66
+ summary: string | null;
67
+ };
68
+ category: string;
69
+ charges?: {
70
+ amountMinor: number;
71
+ chargeType: string;
72
+ currency: CurrencyCode;
73
+ extraMileageCharge: string | null;
74
+ mileageAllowance: string | null;
75
+ unitOfMeasure: string | null;
76
+ }[];
77
+ deskInstructions: string | null;
78
+ dropOffAt: string;
79
+ dropOffLocation: {
80
+ address: string | null;
81
+ latitude: number | null;
82
+ localDateTime?: string;
83
+ longitude: number | null;
84
+ name: string;
85
+ timeZone?: string | null;
86
+ utcOffset?: string | null;
87
+ };
88
+ estimatedCommission: EstimatedCommission | null;
89
+ expiresAt: string;
90
+ extras: {
91
+ availability: "CONFIRMED" | "NOT_AVAILABLE" | "ON_REQUEST";
92
+ billingUnit: "PER_BOOKING" | "PER_DAY" | "PER_HOUR" | "PER_UNIT";
93
+ code: string;
94
+ name: string;
95
+ price: Money;
96
+ }[];
97
+ fuelPolicy: string | null;
98
+ guaranteeRequired: boolean | null;
99
+ images: {
100
+ height: number | null;
101
+ type: string | null;
102
+ url: string;
103
+ width: number | null;
104
+ }[];
105
+ mileagePolicy: string | null;
106
+ offerReference: string;
107
+ paymentPolicy?: {
108
+ kind: "PAY_AT_LOCATION" | "PREPAID" | "UNKNOWN";
109
+ summary: string | null;
110
+ timing: "PICKUP" | "RETURN" | null;
111
+ };
112
+ pickUpAt: string;
113
+ pickUpLocation: {
114
+ address: string | null;
115
+ latitude: number | null;
116
+ localDateTime?: string;
117
+ longitude: number | null;
118
+ name: string;
119
+ timeZone?: string | null;
120
+ utcOffset?: string | null;
121
+ };
122
+ price: {
123
+ breakdown: {
124
+ baseMinor: number | null;
125
+ discountMinor: number;
126
+ nicerAdjustmentMinor: number;
127
+ supplierFeesMinor: number | null;
128
+ taxesMinor: number | null;
129
+ };
130
+ currency: CurrencyCode;
131
+ totalMinor: number;
132
+ };
133
+ productKind: "CAR_RENTAL";
134
+ providerKey: ProviderKey;
135
+ rateCode: string | null;
136
+ ratePlan: string | null;
137
+ rentalDays: number | null;
138
+ rentalHours: number | null;
139
+ specifications: {
140
+ bodyType: string | null;
141
+ cargoCapacity: number | null;
142
+ doors: number | null;
143
+ driveWheelConfiguration: string | null;
144
+ fuelType: string | null;
145
+ luggageCapacity: number | null;
146
+ seatingCapacity: number | null;
147
+ transmission: string | null;
148
+ vehicleType: string | null;
149
+ };
150
+ supplier: {
151
+ code: string | null;
152
+ logoUrl: string | null;
153
+ name: string;
154
+ };
155
+ supplierName: string;
156
+ vehicleName: string;
157
+ }
@@ -0,0 +1,32 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
2
+ import type { CarriersResponse } 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
+ * Search airlines
12
+ *
13
+ * Airlines by name, IATA or ICAO code from the travel reference, ranked with
14
+ * exact codes first. Airlines that stopped flying are left out. Anonymous
15
+ * calls share one budget across the search routes, 600 per hour per IP; a
16
+ * valid bearer token lifts it.
17
+ */
18
+ search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
19
+ }
20
+ export declare function createClient(options: ClientOptions): Client;
21
+ export declare function bind(transport: Transport): Client;
22
+ export interface SearchRequest {
23
+ /**
24
+ * An airline name, or its IATA or ICAO code.
25
+ */
26
+ q: string;
27
+ /**
28
+ * Maximum airlines after ranking.
29
+ */
30
+ limit?: number;
31
+ }
32
+ export type SearchResponse = CarriersResponse;
@@ -0,0 +1,18 @@
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
+ search: (request, options) => transport.send(SearchOperation, request, options),
10
+ };
11
+ }
12
+ const SearchOperation = {
13
+ method: "GET",
14
+ route: "/search/carriers",
15
+ query: { q: "q", limit: "limit" },
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true, "429": true },
18
+ };
@@ -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, SearchRequest, SearchResponse, } from "./client.js";
5
+ export type { Carrier, CarriersResponse, } 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";