@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.
- package/README.md +89 -3
- package/dist/_/codec.d.ts +93 -0
- package/dist/_/codec.js +298 -0
- package/dist/_/error.d.ts +27 -0
- package/dist/_/error.js +68 -0
- package/dist/_/hooks/envelope.d.ts +11 -0
- package/dist/_/hooks/envelope.js +15 -0
- package/dist/_/index.d.ts +3 -0
- package/dist/_/index.js +5 -0
- package/dist/_/transport.d.ts +146 -0
- package/dist/_/transport.js +220 -0
- package/dist/activities/client.d.ts +35 -0
- package/dist/activities/client.js +23 -0
- package/dist/activities/index.d.ts +5 -0
- package/dist/activities/index.js +4 -0
- package/dist/activities/models.d.ts +27 -0
- package/dist/activities/models.js +3 -0
- package/dist/activityDestinations/client.d.ts +24 -0
- package/dist/activityDestinations/client.js +17 -0
- package/dist/activityDestinations/index.d.ts +4 -0
- package/dist/activityDestinations/index.js +4 -0
- package/dist/balances/client.d.ts +29 -0
- package/dist/balances/client.js +18 -0
- package/dist/balances/index.d.ts +5 -0
- package/dist/balances/index.js +4 -0
- package/dist/balances/models.d.ts +12 -0
- package/dist/balances/models.js +3 -0
- package/dist/bookingSelections/client.d.ts +54 -0
- package/dist/bookingSelections/client.js +25 -0
- package/dist/bookingSelections/index.d.ts +5 -0
- package/dist/bookingSelections/index.js +4 -0
- package/dist/bookingSelections/models.d.ts +35 -0
- package/dist/bookingSelections/models.js +3 -0
- package/dist/carRentals/client.d.ts +55 -0
- package/dist/carRentals/client.js +25 -0
- package/dist/carRentals/index.d.ts +5 -0
- package/dist/carRentals/index.js +4 -0
- package/dist/carRentals/models.d.ts +157 -0
- package/dist/carRentals/models.js +3 -0
- package/dist/carriers/client.d.ts +32 -0
- package/dist/carriers/client.js +18 -0
- package/dist/carriers/index.d.ts +5 -0
- package/dist/carriers/index.js +4 -0
- package/dist/carriers/models.d.ts +9 -0
- package/dist/carriers/models.js +3 -0
- package/dist/chats/client.d.ts +69 -0
- package/dist/chats/client.js +38 -0
- package/dist/chats/index.d.ts +5 -0
- package/dist/chats/index.js +4 -0
- package/dist/chats/models.d.ts +25 -0
- package/dist/chats/models.js +3 -0
- package/dist/checkouts/client.d.ts +27 -0
- package/dist/checkouts/client.js +18 -0
- package/dist/checkouts/index.d.ts +5 -0
- package/dist/checkouts/index.js +4 -0
- package/dist/checkouts/models.d.ts +23 -0
- package/dist/checkouts/models.js +3 -0
- package/dist/client.d.ts +95 -0
- package/dist/client.js +220 -0
- package/dist/commissionExports/client.d.ts +62 -0
- package/dist/commissionExports/client.js +33 -0
- package/dist/commissionExports/index.d.ts +5 -0
- package/dist/commissionExports/index.js +4 -0
- package/dist/commissionExports/models.d.ts +165 -0
- package/dist/commissionExports/models.js +3 -0
- package/dist/commissionImports/client.d.ts +61 -0
- package/dist/commissionImports/client.js +34 -0
- package/dist/commissionImports/index.d.ts +5 -0
- package/dist/commissionImports/index.js +4 -0
- package/dist/commissionImports/models.d.ts +118 -0
- package/dist/commissionImports/models.js +3 -0
- package/dist/commissionItems/client.d.ts +128 -0
- package/dist/commissionItems/client.js +41 -0
- package/dist/commissionItems/index.d.ts +5 -0
- package/dist/commissionItems/index.js +4 -0
- package/dist/commissionItems/models.d.ts +217 -0
- package/dist/commissionItems/models.js +3 -0
- package/dist/commissionReports/client.d.ts +76 -0
- package/dist/commissionReports/client.js +18 -0
- package/dist/commissionReports/index.d.ts +5 -0
- package/dist/commissionReports/index.js +4 -0
- package/dist/commissionReports/models.d.ts +208 -0
- package/dist/commissionReports/models.js +3 -0
- package/dist/crmSettings/client.d.ts +50 -0
- package/dist/crmSettings/client.js +25 -0
- package/dist/crmSettings/index.d.ts +5 -0
- package/dist/crmSettings/index.js +4 -0
- package/dist/crmSettings/models.d.ts +313 -0
- package/dist/crmSettings/models.js +3 -0
- package/dist/earnings/client.d.ts +30 -0
- package/dist/earnings/client.js +18 -0
- package/dist/earnings/index.d.ts +5 -0
- package/dist/earnings/index.js +4 -0
- package/dist/earnings/models.d.ts +16 -0
- package/dist/earnings/models.js +3 -0
- package/dist/externalBookings/client.d.ts +56 -0
- package/dist/externalBookings/client.js +33 -0
- package/dist/externalBookings/index.d.ts +5 -0
- package/dist/externalBookings/index.js +4 -0
- package/dist/externalBookings/models.d.ts +93 -0
- package/dist/externalBookings/models.js +3 -0
- package/dist/externalPayments/client.d.ts +23 -0
- package/dist/externalPayments/client.js +18 -0
- package/dist/externalPayments/index.d.ts +5 -0
- package/dist/externalPayments/index.js +4 -0
- package/dist/externalPayments/models.d.ts +47 -0
- package/dist/externalPayments/models.js +3 -0
- package/dist/favorites/client.d.ts +87 -0
- package/dist/favorites/client.js +63 -0
- package/dist/favorites/index.d.ts +5 -0
- package/dist/favorites/index.js +4 -0
- package/dist/favorites/models.d.ts +79 -0
- package/dist/favorites/models.js +3 -0
- package/dist/flightSchedules/client.d.ts +29 -0
- package/dist/flightSchedules/client.js +18 -0
- package/dist/flightSchedules/index.d.ts +5 -0
- package/dist/flightSchedules/index.js +4 -0
- package/dist/flightSchedules/models.d.ts +25 -0
- package/dist/flightSchedules/models.js +3 -0
- package/dist/flights/client.d.ts +73 -0
- package/dist/flights/client.js +25 -0
- package/dist/flights/index.d.ts +5 -0
- package/dist/flights/index.js +4 -0
- package/dist/flights/models.d.ts +345 -0
- package/dist/flights/models.js +3 -0
- package/dist/hotels/client.d.ts +104 -0
- package/dist/hotels/client.js +26 -0
- package/dist/hotels/index.d.ts +5 -0
- package/dist/hotels/index.js +4 -0
- package/dist/hotels/models.d.ts +355 -0
- package/dist/hotels/models.js +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/insuranceQuotes/client.d.ts +27 -0
- package/dist/insuranceQuotes/client.js +18 -0
- package/dist/insuranceQuotes/index.d.ts +5 -0
- package/dist/insuranceQuotes/index.js +4 -0
- package/dist/insuranceQuotes/models.d.ts +76 -0
- package/dist/insuranceQuotes/models.js +3 -0
- package/dist/itineraries/client.d.ts +165 -0
- package/dist/itineraries/client.js +86 -0
- package/dist/itineraries/index.d.ts +5 -0
- package/dist/itineraries/index.js +4 -0
- package/dist/itineraries/models.d.ts +1619 -0
- package/dist/itineraries/models.js +4 -0
- package/dist/models.d.ts +1361 -0
- package/dist/models.js +3 -0
- package/dist/notes/client.d.ts +82 -0
- package/dist/notes/client.js +41 -0
- package/dist/notes/index.d.ts +5 -0
- package/dist/notes/index.js +4 -0
- package/dist/notes/models.d.ts +116 -0
- package/dist/notes/models.js +3 -0
- package/dist/offers/client.d.ts +27 -0
- package/dist/offers/client.js +17 -0
- package/dist/offers/index.d.ts +5 -0
- package/dist/offers/index.js +4 -0
- package/dist/offers/models.d.ts +19 -0
- package/dist/offers/models.js +3 -0
- package/dist/options/index.d.ts +114 -0
- package/dist/options/index.js +115 -0
- package/dist/orders/client.d.ts +154 -0
- package/dist/orders/client.js +65 -0
- package/dist/orders/index.d.ts +5 -0
- package/dist/orders/index.js +4 -0
- package/dist/orders/models.d.ts +2510 -0
- package/dist/orders/models.js +3 -0
- package/dist/payees/client.d.ts +48 -0
- package/dist/payees/client.js +26 -0
- package/dist/payees/index.d.ts +5 -0
- package/dist/payees/index.js +4 -0
- package/dist/payees/models.d.ts +50 -0
- package/dist/payees/models.js +3 -0
- package/dist/paymentMethods/client.d.ts +24 -0
- package/dist/paymentMethods/client.js +18 -0
- package/dist/paymentMethods/index.d.ts +5 -0
- package/dist/paymentMethods/index.js +4 -0
- package/dist/paymentMethods/models.d.ts +60 -0
- package/dist/paymentMethods/models.js +3 -0
- package/dist/places/client.d.ts +61 -0
- package/dist/places/client.js +25 -0
- package/dist/places/index.d.ts +5 -0
- package/dist/places/index.js +4 -0
- package/dist/places/models.d.ts +51 -0
- package/dist/places/models.js +3 -0
- package/dist/profileForms/client.d.ts +38 -0
- package/dist/profileForms/client.js +25 -0
- package/dist/profileForms/index.d.ts +5 -0
- package/dist/profileForms/index.js +4 -0
- package/dist/profileForms/models.d.ts +24 -0
- package/dist/profileForms/models.js +3 -0
- package/dist/quotes/client.d.ts +30 -0
- package/dist/quotes/client.js +18 -0
- package/dist/quotes/index.d.ts +5 -0
- package/dist/quotes/index.js +4 -0
- package/dist/quotes/models.d.ts +47 -0
- package/dist/quotes/models.js +3 -0
- package/dist/remittanceBatches/client.d.ts +78 -0
- package/dist/remittanceBatches/client.js +42 -0
- package/dist/remittanceBatches/index.d.ts +5 -0
- package/dist/remittanceBatches/index.js +4 -0
- package/dist/remittanceBatches/models.d.ts +131 -0
- package/dist/remittanceBatches/models.js +3 -0
- package/dist/remittanceClaims/client.d.ts +27 -0
- package/dist/remittanceClaims/client.js +18 -0
- package/dist/remittanceClaims/index.d.ts +5 -0
- package/dist/remittanceClaims/index.js +4 -0
- package/dist/remittanceClaims/models.d.ts +5 -0
- package/dist/remittanceClaims/models.js +3 -0
- package/dist/remittanceLines/client.d.ts +27 -0
- package/dist/remittanceLines/client.js +18 -0
- package/dist/remittanceLines/index.d.ts +5 -0
- package/dist/remittanceLines/index.js +4 -0
- package/dist/remittanceLines/models.d.ts +5 -0
- package/dist/remittanceLines/models.js +3 -0
- package/dist/remittances/client.d.ts +78 -0
- package/dist/remittances/client.js +42 -0
- package/dist/remittances/index.d.ts +5 -0
- package/dist/remittances/index.js +4 -0
- package/dist/remittances/models.d.ts +116 -0
- package/dist/remittances/models.js +3 -0
- package/dist/statements/client.d.ts +75 -0
- package/dist/statements/client.js +34 -0
- package/dist/statements/index.d.ts +5 -0
- package/dist/statements/index.js +4 -0
- package/dist/statements/models.d.ts +147 -0
- package/dist/statements/models.js +3 -0
- package/dist/suppliers/client.d.ts +71 -0
- package/dist/suppliers/client.js +41 -0
- package/dist/suppliers/index.d.ts +5 -0
- package/dist/suppliers/index.js +4 -0
- package/dist/suppliers/models.d.ts +130 -0
- package/dist/suppliers/models.js +3 -0
- package/dist/taskTemplates/client.d.ts +36 -0
- package/dist/taskTemplates/client.js +18 -0
- package/dist/taskTemplates/index.d.ts +5 -0
- package/dist/taskTemplates/index.js +4 -0
- package/dist/taskTemplates/models.d.ts +15 -0
- package/dist/taskTemplates/models.js +3 -0
- package/dist/tasks/client.d.ts +105 -0
- package/dist/tasks/client.js +41 -0
- package/dist/tasks/index.d.ts +5 -0
- package/dist/tasks/index.js +4 -0
- package/dist/tasks/models.d.ts +59 -0
- package/dist/tasks/models.js +3 -0
- package/dist/timeline/client.d.ts +42 -0
- package/dist/timeline/client.js +18 -0
- package/dist/timeline/index.d.ts +5 -0
- package/dist/timeline/index.js +4 -0
- package/dist/timeline/models.d.ts +65 -0
- package/dist/timeline/models.js +3 -0
- package/dist/travelProfile/client.d.ts +56 -0
- package/dist/travelProfile/client.js +25 -0
- package/dist/travelProfile/index.d.ts +5 -0
- package/dist/travelProfile/index.js +4 -0
- package/dist/travelProfile/models.d.ts +95 -0
- package/dist/travelProfile/models.js +3 -0
- package/dist/travelers/client.d.ts +214 -0
- package/dist/travelers/client.js +76 -0
- package/dist/travelers/index.d.ts +5 -0
- package/dist/travelers/index.js +4 -0
- package/dist/travelers/models.d.ts +576 -0
- package/dist/travelers/models.js +3 -0
- package/dist/trips/client.d.ts +224 -0
- package/dist/trips/client.js +88 -0
- package/dist/trips/index.d.ts +5 -0
- package/dist/trips/index.js +4 -0
- package/dist/trips/models.d.ts +486 -0
- package/dist/trips/models.js +3 -0
- package/package.json +35 -2
|
@@ -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";
|
|
@@ -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,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,69 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
|
|
2
|
+
import type { ChatReplyBody, ChatReplyResponse, ToggleArchiveBody, ToggleArchiveResponse } 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 chat with messages and users
|
|
12
|
+
*
|
|
13
|
+
* Returns the chat view, a page of messages with per-participant seen flags,
|
|
14
|
+
* and the user records of participants, past authors and synthetic system
|
|
15
|
+
* senders, and marks the chat read for the caller. The caller must have
|
|
16
|
+
* access to the channel.
|
|
17
|
+
*/
|
|
18
|
+
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* List chats in the caller's inbox
|
|
21
|
+
*
|
|
22
|
+
* Lists chats ordered by last activity with participant summaries, unread
|
|
23
|
+
* counts, archive state and whether the trip has an open order. `fields`
|
|
24
|
+
* names the parts of a row to return (dotted for nested, `-` to remove one);
|
|
25
|
+
* omitted, a row carries everything but the trip's destination photo
|
|
26
|
+
* galleries, which are three quarters of the body and which no screen reads.
|
|
27
|
+
* The default scope is the caller's own chats; company scope requires a
|
|
28
|
+
* company admin and all-chats scope requires a superadmin, returning 403
|
|
29
|
+
* otherwise.
|
|
30
|
+
*/
|
|
31
|
+
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Post a message to a chat
|
|
34
|
+
*
|
|
35
|
+
* Appends a message, text and/or attachment URLs, to the chat, updates the
|
|
36
|
+
* channel's last-message time and the author's read mark, and emits a
|
|
37
|
+
* conversation-created event. Requires message text or at least one asset;
|
|
38
|
+
* assets must be reachable HTTPS URLs and text is capped at 10,000
|
|
39
|
+
* characters. Returns the stored row with HTML stripped from the plain text
|
|
40
|
+
* and a rendered HTML copy.
|
|
41
|
+
*/
|
|
42
|
+
reply(request: ReplyRequest, options?: RequestOptions): Promise<ReplyResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Archive or unarchive a chat
|
|
45
|
+
*
|
|
46
|
+
* Sets the caller's own archive flag: on a trip chat it updates the caller's
|
|
47
|
+
* trip membership row, on a direct chat it adds or removes the caller in the
|
|
48
|
+
* archived-by set. Other participants are unaffected. The caller must be a
|
|
49
|
+
* participant. Echoes the requested state back.
|
|
50
|
+
*/
|
|
51
|
+
setArchived(request: SetArchivedRequest, options?: RequestOptions): Promise<SetArchivedResponse>;
|
|
52
|
+
}
|
|
53
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
54
|
+
export declare function bind(transport: Transport): Client;
|
|
55
|
+
export interface GetRequest {
|
|
56
|
+
chatId: string;
|
|
57
|
+
}
|
|
58
|
+
export type GetResponse = void;
|
|
59
|
+
export interface ListRequest {
|
|
60
|
+
}
|
|
61
|
+
export type ListResponse = void;
|
|
62
|
+
export type ReplyRequest = {
|
|
63
|
+
chatId: string;
|
|
64
|
+
} & ChatReplyBody;
|
|
65
|
+
export type ReplyResponse = ChatReplyResponse;
|
|
66
|
+
export type SetArchivedRequest = {
|
|
67
|
+
chatId: string;
|
|
68
|
+
} & ToggleArchiveBody;
|
|
69
|
+
export type SetArchivedResponse = ToggleArchiveResponse;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
11
|
+
reply: (request, options) => transport.send(ReplyOperation, request, options),
|
|
12
|
+
setArchived: (request, options) => transport.send(SetArchivedOperation, request, options),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const GetOperation = {
|
|
16
|
+
method: "GET",
|
|
17
|
+
route: "/chat/{chatId}",
|
|
18
|
+
errors: { "400": true, "401": true, "403": true },
|
|
19
|
+
};
|
|
20
|
+
const ListOperation = {
|
|
21
|
+
method: "GET",
|
|
22
|
+
route: "/chat",
|
|
23
|
+
errors: { "400": true, "401": true, "403": true },
|
|
24
|
+
};
|
|
25
|
+
const ReplyOperation = {
|
|
26
|
+
method: "POST",
|
|
27
|
+
route: "/chat/{chatId}/reply",
|
|
28
|
+
body: "flat",
|
|
29
|
+
response: null,
|
|
30
|
+
errors: { "400": true, "401": true, "403": true },
|
|
31
|
+
};
|
|
32
|
+
const SetArchivedOperation = {
|
|
33
|
+
method: "POST",
|
|
34
|
+
route: "/chat/{chatId}/toggle-archive",
|
|
35
|
+
body: "flat",
|
|
36
|
+
response: null,
|
|
37
|
+
errors: { "400": true, "401": true, "403": true },
|
|
38
|
+
};
|
|
@@ -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, ListRequest, ListResponse, ReplyRequest, ReplyResponse, SetArchivedRequest, SetArchivedResponse, } from "./client.js";
|
|
5
|
+
export type { ChatReplyBody, ChatReplyResponse, ToggleArchiveBody, ToggleArchiveResponse, } from "./models.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ChatReplyBody {
|
|
2
|
+
assetsUrls?: string[];
|
|
3
|
+
message?: string;
|
|
4
|
+
needsAiResponse?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ChatReplyResponse {
|
|
7
|
+
attachmentUrls: string[];
|
|
8
|
+
authorId: string;
|
|
9
|
+
chatId: string;
|
|
10
|
+
conversationId: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
createdBy: string;
|
|
13
|
+
lastModifiedBy: string;
|
|
14
|
+
message: string;
|
|
15
|
+
messageHtml: string;
|
|
16
|
+
needsAiResponse?: boolean;
|
|
17
|
+
type: "ChatConversation";
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ToggleArchiveBody {
|
|
21
|
+
isArchived: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ToggleArchiveResponse {
|
|
24
|
+
isArchived: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
|
|
2
|
+
import type { CheckoutCreateBody, CheckoutCreateResponse } 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
|
+
* Prepare an unpaid checkout from an offer
|
|
12
|
+
*
|
|
13
|
+
* Turns a live search offer into an unpaid order: it re-validates the offer
|
|
14
|
+
* with the provider, prices it, and creates the order on the trip;
|
|
15
|
+
* `paymentUrl` is null, and `createPaymentLink` makes the link. Nothing is
|
|
16
|
+
* paid, held or reserved. Calling it twice for the same offer on the same
|
|
17
|
+
* trip returns the same order rather than a second one — the key is the offer
|
|
18
|
+
* and the trip, so no caller has to invent one. `status` is `OK` with the
|
|
19
|
+
* order, `PRICE_CHANGED` when the provider now charges something else (search
|
|
20
|
+
* again and use the new offer), or `UNAVAILABLE` when the offer is gone.
|
|
21
|
+
*/
|
|
22
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
23
|
+
}
|
|
24
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
25
|
+
export declare function bind(transport: Transport): Client;
|
|
26
|
+
export type CreateRequest = CheckoutCreateBody;
|
|
27
|
+
export type CreateResponse = CheckoutCreateResponse;
|
|
@@ -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
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const CreateOperation = {
|
|
13
|
+
method: "POST",
|
|
14
|
+
route: "/commerce/checkouts",
|
|
15
|
+
body: "flat",
|
|
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, CreateRequest, CreateResponse, } from "./client.js";
|
|
5
|
+
export type { CheckoutCreateBody, CheckoutCreateResponse, } from "./models.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CurrencyCode } from "../models.js";
|
|
2
|
+
export interface CheckoutCreateBody {
|
|
3
|
+
/**
|
|
4
|
+
* The offer to buy, from a hotel, flight or car search.
|
|
5
|
+
*/
|
|
6
|
+
offerReference: string;
|
|
7
|
+
/**
|
|
8
|
+
* The trip the order belongs to.
|
|
9
|
+
*/
|
|
10
|
+
travelersTripId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CheckoutCreateResponse {
|
|
13
|
+
checkout: {
|
|
14
|
+
currency: CurrencyCode;
|
|
15
|
+
expiresAt: string;
|
|
16
|
+
orderId: string;
|
|
17
|
+
paymentUrl: string | null;
|
|
18
|
+
title: string;
|
|
19
|
+
totalMinor: number;
|
|
20
|
+
} | null;
|
|
21
|
+
reason: string | null;
|
|
22
|
+
status: "OK" | "PRICE_CHANGED" | "UNAVAILABLE";
|
|
23
|
+
}
|