sabre-client 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Carlos Ivan Soto Perez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # Sabre Node.js SDK
2
+
3
+ Node.js library for the Sabre API (REST).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install sabre-client
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ First, you need to get an username, password and pcc which is available in the [DEV STUDIO - Applications](https://developer.sabre.com/my-account/applications).
14
+
15
+ ```js
16
+ import { Sabre } from 'sabre-client';
17
+
18
+ const sabre = new Sabre({
19
+ username: '773400',
20
+ password: 'PASSWORD_GOES_HERE',
21
+ organization: '7TZA', // pcc
22
+ });
23
+ ```
24
+
25
+ ## Documentation
26
+
27
+ See http://developer.sabre.com
28
+
29
+ ## Usage
30
+
31
+ Send the request for acquiring an authentication ATK session token.
32
+
33
+ ```js
34
+ await sabre.authentication.OAuthTokenV2();
35
+ ```
36
+
37
+ ## Get booking
38
+
39
+ Displays comprehensive booking details irrespective of source, optionally narrowing down the response to selected elements.
40
+
41
+ ```js
42
+ await sabre.booking.get({
43
+ confirmationId: 'GLEBNY',
44
+ returnOnly: [],
45
+ });
46
+ ```
47
+
48
+ ## Create booking
49
+
50
+ Creates an air booking (NDC/ATPCO/LCC).
51
+
52
+ ```js
53
+ await sabre.booking.create(options);
54
+ ```
55
+
56
+ ## Modify Booking
57
+
58
+ Creates a list of booking items that need to be modified.
59
+
60
+ ```js
61
+ await sabre.booking.modify(options);
62
+ ```
63
+
64
+ ## Cancel Booking
65
+
66
+ Cancels a booking or specified booking items, optionally voiding or refunding related flight tickets.
67
+
68
+ ```js
69
+ await sabre.booking.cancel(options);
70
+ ```
71
+
72
+ ## Void Flight Tickets
73
+
74
+ Voids tickets with ticket numbers listed in the request, optionally including nonelectronic tickets (paper).
75
+
76
+ ```js
77
+ await sabre.flightTickets.void(options);
78
+ ```
79
+
80
+ ## Refund Flight Tickets
81
+
82
+ Processes tickets by providing a request containing a list of ticket numbers which should be refunded. EMDs are currently not supported.
83
+
84
+ ```js
85
+ await sabre.flightTickets.refund(options);
86
+ ```
87
+
88
+ ## Check Flight Tickets
89
+
90
+ Checks tickets with ticket numbers listed in the request for void, refund and exchange conditions. EMDs are currently not supported.
91
+
92
+ ```js
93
+ await sabre.flightTickets.check(options);
94
+ ```
95
+
96
+ ## Development
97
+
98
+ #### Install dependencies
99
+
100
+ ```sh
101
+ npm install
102
+ ```
103
+
104
+ #### Build and run packages
105
+
106
+ ```sh
107
+ npm dev
108
+ ```
109
+
110
+ ## Authors
111
+
112
+ - Carlos Ivan Soto ([carlosivansotop](https://www.linkedin.com/in/carlosivansotop/))
113
+
114
+ ## License
115
+
116
+ MIT License