sabre-client 0.2.0 → 0.2.1

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 CHANGED
@@ -34,7 +34,7 @@ Send the request for acquiring an authentication ATK session token.
34
34
  await sabre.authentication.OAuthTokenV2();
35
35
  ```
36
36
 
37
- ### Get booking
37
+ ### Get booking v1.30
38
38
 
39
39
  Displays comprehensive booking details irrespective of source, optionally narrowing down the response to selected elements.
40
40
 
@@ -93,6 +93,38 @@ Checks tickets with ticket numbers listed in the request for void, refund and ex
93
93
  await sabre.flightTickets.check(options);
94
94
  ```
95
95
 
96
+ ### Fulfill Flight Tickets
97
+
98
+ Processes the issuance of tickets and various electronic miscellaneous documents (EMDs). EMDs are currently not supported.
99
+
100
+ ```js
101
+ await sabre.flightTickets.fulfill(options);
102
+ ```
103
+
104
+ ### Bargain Finder Max (Search)
105
+
106
+ Searches for the lowest available priced itineraries for a given origin and destination.
107
+
108
+ ```js
109
+ await sabre.search.shop(options);
110
+ ```
111
+
112
+ ### Revalidate Itinerary (Search)
113
+
114
+ The Revalidate Itinerary API allows you to re-query the availability and price of a specific itinerary option without having to book it.
115
+
116
+ ```js
117
+ await sabre.search.revalidate(options);
118
+ ```
119
+
120
+ ### Issue Ticket (Ticketing)
121
+
122
+ Issues an airline ticket from an existing PNR (booking).
123
+
124
+ ```js
125
+ await sabre.ticketing.issue(options);
126
+ ```
127
+
96
128
  ## Development
97
129
 
98
130
  #### Install dependencies
package/dist/index.cjs CHANGED
@@ -24,6 +24,92 @@ __export(index_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(index_exports);
26
26
 
27
+ // src/air/search.ts
28
+ var Search = class {
29
+ /**
30
+ * Bargain Finder Max v5
31
+ *
32
+ * Bargain Finder Max (BFM),
33
+ * nuestro producto de búsqueda de tarifas bajas líder en su clase,
34
+ * se utiliza para buscar los itinerarios con los precios más bajos disponibles según una fecha específica.
35
+ *
36
+ * Revalidate Itinerary v5
37
+ *
38
+ * La API Revalidate Itinerary permite volver a consultar la disponibilidad
39
+ * y el precio de una opción de itinerario específica sin tener que reservarla.
40
+ * La solución revalida si la opción de itinerario es válida para la compra.
41
+ * Revalidate Itinerary no admite contenido NDC.
42
+ *
43
+ * @param sabre Sabre Client Reference
44
+ */
45
+ constructor(sabre) {
46
+ this.sabre = sabre;
47
+ }
48
+ /**
49
+ * Crear solicitud de Buscador de ofertas Max.
50
+ *
51
+ * payload - El mensaje de solicitud de búsqueda de tarifa baja solicita opciones
52
+ * de itinerario para vuelos entre pares de ciudades específicos, en fechas específicas,
53
+ * para un número y tipo de pasajeros específicos.
54
+ * La información opcional de la solicitud puede incluir:
55
+ * hora/ventana horaria, ciudades de conexión
56
+ * y preferencias del cliente (aerolíneas, cabina, tipo de vuelo, etc.).
57
+ * La solicitud de búsqueda de tarifa baja contiene información similar a
58
+ * la de una búsqueda de tarifa baja en el CRS o GDS de una aerolínea.
59
+ * @param payload BargainFinderMaxOptions
60
+ * @returns {Promise<BargainFinderMaxResponseSuccess>}
61
+ */
62
+ async shop(payload) {
63
+ const path = "/v5/offers/shop";
64
+ return this.sabre.post(path, payload);
65
+ }
66
+ /**
67
+ * Crear solicitud de revalidación de itinerario.
68
+ *
69
+ * payload - El mensaje de solicitud de búsqueda de tarifa baja solicita opciones
70
+ * de itinerario para vuelos entre pares de ciudades específicos, en fechas específicas,
71
+ * para un número y tipo de pasajeros específicos.
72
+ * La información opcional de la solicitud puede incluir:
73
+ * hora/ventana horaria, ciudades de conexión
74
+ * y preferencias del cliente (aerolíneas, cabina, tipo de vuelo, etc.).
75
+ * La solicitud de búsqueda de tarifa baja contiene información similar a
76
+ * la de una búsqueda de tarifa baja en el CRS o GDS de una aerolínea.
77
+ * @param payload RevalidateItineraryOptions
78
+ * @returns {Promise<RevalidateItineraryResponseSuccess>}
79
+ */
80
+ async revalidate(payload) {
81
+ const path = "/v5/shop/flights/revalidate";
82
+ return this.sabre.post(path, payload);
83
+ }
84
+ };
85
+
86
+ // src/air/ticketing.ts
87
+ var Ticketing = class {
88
+ /**
89
+ * Enhanced Air Ticket v1.3.0
90
+ *
91
+ * La API de boletos aéreos mejorados se utiliza para emitir uno o varios boletos aéreos
92
+ * y/o EMD (documentos electrónicos varios) dentro de una sola llamada API.
93
+ *
94
+ * @param sabre Sabre Client Reference
95
+ */
96
+ constructor(sabre) {
97
+ this.sabre = sabre;
98
+ }
99
+ /**
100
+ * La API de boletos aéreos mejorados (AirTicketRQ)
101
+ * se utiliza para emitir boletos aéreos y documentos electrónicos varios (EMD) en una sola solicitud.
102
+ *
103
+ * payload - Solicitud de API de boletos aéreos orquestada.
104
+ * @param payload EnhancedAirTicketOptions
105
+ * @returns {Promise<EnhancedAirTicketResponseSuccess>}
106
+ */
107
+ async issue(payload) {
108
+ const path = "/v1.3.0/air/ticket";
109
+ return this.sabre.post(path, payload);
110
+ }
111
+ };
112
+
27
113
  // src/authentication/authentication.ts
28
114
  var grantType = new URLSearchParams({ "grant_type": "client_credentials" }).toString();
29
115
  var Authentication = class {
@@ -167,7 +253,7 @@ var FlightTickets = class {
167
253
  };
168
254
 
169
255
  // package.json
170
- var version = "0.2.0";
256
+ var version = "0.2.1";
171
257
 
172
258
  // src/config.ts
173
259
  var defaultBaseUrl = "https://api.platform.sabre.com";
@@ -220,6 +306,8 @@ var Sabre = class {
220
306
  authentication = new Authentication(this);
221
307
  booking = new Booking(this);
222
308
  flightTickets = new FlightTickets(this);
309
+ search = new Search(this);
310
+ ticketing = new Ticketing(this);
223
311
  setAuthorization(token) {
224
312
  this.headers.set("Authorization", `Bearer ${token}`);
225
313
  this.headers.set("Content-Type", "application/json");