sabre-legacy-client 0.1.0 → 0.1.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 +19 -4
- package/dist/index.d.mts +366 -0
- package/dist/index.d.ts +366 -0
- package/dist/index.js +603 -0
- package/dist/index.mjs +581 -0
- package/package.json +20 -8
- package/build/index.d.ts +0 -9
- package/build/index.js +0 -8
- package/build/package.json +0 -44
- package/build/src/authentication/authentication..d.ts +0 -21
- package/build/src/authentication/authentication..js +0 -28
- package/build/src/authentication/helpers/index.d.ts +0 -1
- package/build/src/authentication/helpers/index.js +0 -1
- package/build/src/authentication/helpers/username-token.helper.d.ts +0 -15
- package/build/src/authentication/helpers/username-token.helper.js +0 -17
- package/build/src/authentication/requests/index.d.ts +0 -4
- package/build/src/authentication/requests/index.js +0 -4
- package/build/src/authentication/requests/interfaces/ping-options.interface.d.ts +0 -3
- package/build/src/authentication/requests/interfaces/ping-options.interface.js +0 -1
- package/build/src/authentication/requests/interfaces/session-close-options.interface.d.ts +0 -3
- package/build/src/authentication/requests/interfaces/session-close-options.interface.js +0 -1
- package/build/src/authentication/requests/interfaces/session-create-options.interface.d.ts +0 -5
- package/build/src/authentication/requests/interfaces/session-create-options.interface.js +0 -1
- package/build/src/authentication/requests/interfaces/token-create-options.interface.d.ts +0 -3
- package/build/src/authentication/requests/interfaces/token-create-options.interface.js +0 -1
- package/build/src/authentication/requests/interfaces/username-token-options.interface.d.ts +0 -8
- package/build/src/authentication/requests/interfaces/username-token-options.interface.js +0 -1
- package/build/src/authentication/requests/ping.request.d.ts +0 -12
- package/build/src/authentication/requests/ping.request.js +0 -16
- package/build/src/authentication/requests/session-close.request.d.ts +0 -12
- package/build/src/authentication/requests/session-close.request.js +0 -16
- package/build/src/authentication/requests/session-create.request.d.ts +0 -12
- package/build/src/authentication/requests/session-create.request.js +0 -26
- package/build/src/authentication/requests/token-create.request.d.ts +0 -12
- package/build/src/authentication/requests/token-create.request.js +0 -26
- package/build/src/common/config/xml-parser.config.d.ts +0 -1
- package/build/src/common/config/xml-parser.config.js +0 -17
- package/build/src/common/helpers/header.helper.d.ts +0 -10
- package/build/src/common/helpers/header.helper.js +0 -14
- package/build/src/common/helpers/message-header.helper.d.ts +0 -17
- package/build/src/common/helpers/message-header.helper.js +0 -19
- package/build/src/common/helpers/request.helper.d.ts +0 -12
- package/build/src/common/helpers/request.helper.js +0 -19
- package/build/src/common/helpers/security.helper.d.ts +0 -9
- package/build/src/common/helpers/security.helper.js +0 -11
- package/build/src/common/helpers/soap-env.helper.d.ts +0 -15
- package/build/src/common/helpers/soap-env.helper.js +0 -17
- package/build/src/common/interfaces/actions.interface.d.ts +0 -16
- package/build/src/common/interfaces/actions.interface.js +0 -18
- package/build/src/common/interfaces/application-results.interface.d.ts +0 -12
- package/build/src/common/interfaces/application-results.interface.js +0 -1
- package/build/src/common/interfaces/header-options.interface.d.ts +0 -5
- package/build/src/common/interfaces/header-options.interface.js +0 -1
- package/build/src/common/interfaces/headers-request-options.interface.d.ts +0 -4
- package/build/src/common/interfaces/headers-request-options.interface.js +0 -1
- package/build/src/common/interfaces/index.d.ts +0 -8
- package/build/src/common/interfaces/index.js +0 -8
- package/build/src/common/interfaces/message-header-options.interface.d.ts +0 -7
- package/build/src/common/interfaces/message-header-options.interface.js +0 -1
- package/build/src/common/interfaces/post-options.interface.d.ts +0 -5
- package/build/src/common/interfaces/post-options.interface.js +0 -1
- package/build/src/common/interfaces/request-options.interface.d.ts +0 -4
- package/build/src/common/interfaces/request-options.interface.js +0 -1
- package/build/src/common/interfaces/soap-env-options.interface.d.ts +0 -4
- package/build/src/common/interfaces/soap-env-options.interface.js +0 -1
- package/build/src/common/utils/get-sub-string.d.ts +0 -1
- package/build/src/common/utils/get-sub-string.js +0 -11
- package/build/src/config.d.ts +0 -5
- package/build/src/config.js +0 -18
- package/build/src/daily-sales/common/interfaces/cupon-type.enum.d.ts +0 -7
- package/build/src/daily-sales/common/interfaces/cupon-type.enum.js +0 -6
- package/build/src/daily-sales/common/interfaces/document-type.enum.d.ts +0 -9
- package/build/src/daily-sales/common/interfaces/document-type.enum.js +0 -8
- package/build/src/daily-sales/common/interfaces/index.d.ts +0 -5
- package/build/src/daily-sales/common/interfaces/index.js +0 -5
- package/build/src/daily-sales/common/interfaces/selection-criteria.interface.d.ts +0 -13
- package/build/src/daily-sales/common/interfaces/selection-criteria.interface.js +0 -1
- package/build/src/daily-sales/common/interfaces/settlement-type.enum.d.ts +0 -7
- package/build/src/daily-sales/common/interfaces/settlement-type.enum.js +0 -6
- package/build/src/daily-sales/common/interfaces/transaction-type.enum.d.ts +0 -8
- package/build/src/daily-sales/common/interfaces/transaction-type.enum.js +0 -7
- package/build/src/daily-sales/common/requests/interfaces/report-options.interface.d.ts +0 -7
- package/build/src/daily-sales/common/requests/interfaces/report-options.interface.js +0 -1
- package/build/src/daily-sales/common/requests/interfaces/summary-options.interface.d.ts +0 -15
- package/build/src/daily-sales/common/requests/interfaces/summary-options.interface.js +0 -1
- package/build/src/daily-sales/common/requests/report.request.d.ts +0 -10
- package/build/src/daily-sales/common/requests/report.request.js +0 -17
- package/build/src/daily-sales/common/requests/summary.request.d.ts +0 -15
- package/build/src/daily-sales/common/requests/summary.request.js +0 -24
- package/build/src/daily-sales/common/utils/parse-summary-options-to-selection-criteria.d.ts +0 -4
- package/build/src/daily-sales/common/utils/parse-summary-options-to-selection-criteria.js +0 -16
- package/build/src/daily-sales/common/utils/parse-summary-options-to-xml.d.ts +0 -3
- package/build/src/daily-sales/common/utils/parse-summary-options-to-xml.js +0 -8
- package/build/src/daily-sales/common/utils/parse-summary-options-to-xml.spec.d.ts +0 -1
- package/build/src/daily-sales/common/utils/parse-summary-options-to-xml.spec.js +0 -30
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-report.d.ts +0 -2
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-report.js +0 -5
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-report.spec.d.ts +0 -1
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-report.spec.js +0 -56
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-summary.d.ts +0 -2
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-summary.js +0 -5
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-summary.spec.d.ts +0 -1
- package/build/src/daily-sales/common/utils/parse-xml-to-daily-sales-summary.spec.js +0 -61
- package/build/src/daily-sales/daily-sales.d.ts +0 -9
- package/build/src/daily-sales/daily-sales.js +0 -41
- package/build/src/daily-sales/interfaces/daily-sales-report-options.interface.d.ts +0 -63
- package/build/src/daily-sales/interfaces/daily-sales-report-options.interface.js +0 -1
- package/build/src/daily-sales/interfaces/daily-sales-summary-options.interface.d.ts +0 -107
- package/build/src/daily-sales/interfaces/daily-sales-summary-options.interface.js +0 -1
- package/build/src/interfaces.d.ts +0 -24
- package/build/src/interfaces.js +0 -17
- package/build/src/queue/common/helpers/interfaces/navigation-actions.interface.d.ts +0 -5
- package/build/src/queue/common/helpers/interfaces/navigation-actions.interface.js +0 -6
- package/build/src/queue/common/helpers/interfaces/queue-identifier-options.interface.d.ts +0 -6
- package/build/src/queue/common/helpers/interfaces/queue-identifier-options.interface.js +0 -1
- package/build/src/queue/common/helpers/navigation-action.helper.d.ts +0 -3
- package/build/src/queue/common/helpers/navigation-action.helper.js +0 -7
- package/build/src/queue/common/helpers/queue-access.helper.d.ts +0 -9
- package/build/src/queue/common/helpers/queue-access.helper.js +0 -11
- package/build/src/queue/common/helpers/queue-count.helper.d.ts +0 -10
- package/build/src/queue/common/helpers/queue-count.helper.js +0 -12
- package/build/src/queue/common/helpers/queue-identifier.helper.d.ts +0 -18
- package/build/src/queue/common/helpers/queue-identifier.helper.js +0 -23
- package/build/src/queue/common/helpers/queue-place.helper.d.ts +0 -10
- package/build/src/queue/common/helpers/queue-place.helper.js +0 -12
- package/build/src/queue/common/interfaces/index.d.ts +0 -2
- package/build/src/queue/common/interfaces/index.js +0 -2
- package/build/src/queue/common/interfaces/notification.interface.d.ts +0 -5
- package/build/src/queue/common/interfaces/notification.interface.js +0 -1
- package/build/src/queue/common/interfaces/warning.interface.d.ts +0 -4
- package/build/src/queue/common/interfaces/warning.interface.js +0 -1
- package/build/src/queue/common/requests/access-list.request.d.ts +0 -12
- package/build/src/queue/common/requests/access-list.request.js +0 -22
- package/build/src/queue/common/requests/access.request.d.ts +0 -12
- package/build/src/queue/common/requests/access.request.js +0 -22
- package/build/src/queue/common/requests/count.request.d.ts +0 -12
- package/build/src/queue/common/requests/count.request.js +0 -25
- package/build/src/queue/common/requests/exit.request.d.ts +0 -12
- package/build/src/queue/common/requests/exit.request.js +0 -19
- package/build/src/queue/common/requests/ignore.request.d.ts +0 -12
- package/build/src/queue/common/requests/ignore.request.js +0 -19
- package/build/src/queue/common/requests/index.d.ts +0 -7
- package/build/src/queue/common/requests/index.js +0 -7
- package/build/src/queue/common/requests/interfaces/access-options.interface.d.ts +0 -5
- package/build/src/queue/common/requests/interfaces/access-options.interface.js +0 -1
- package/build/src/queue/common/requests/interfaces/count-options.interface.d.ts +0 -4
- package/build/src/queue/common/requests/interfaces/count-options.interface.js +0 -1
- package/build/src/queue/common/requests/interfaces/exit-options.interface.d.ts +0 -3
- package/build/src/queue/common/requests/interfaces/exit-options.interface.js +0 -1
- package/build/src/queue/common/requests/interfaces/ignore-options.interface.d.ts +0 -3
- package/build/src/queue/common/requests/interfaces/ignore-options.interface.js +0 -1
- package/build/src/queue/common/requests/interfaces/place-options.inferface.d.ts +0 -3
- package/build/src/queue/common/requests/interfaces/place-options.inferface.js +0 -1
- package/build/src/queue/common/requests/interfaces/remove-options.interface.d.ts +0 -3
- package/build/src/queue/common/requests/interfaces/remove-options.interface.js +0 -1
- package/build/src/queue/common/requests/place.request.d.ts +0 -12
- package/build/src/queue/common/requests/place.request.js +0 -20
- package/build/src/queue/common/requests/remove.request.d.ts +0 -12
- package/build/src/queue/common/requests/remove.request.js +0 -19
- package/build/src/queue/common/utils/find-booking-id.d.ts +0 -2
- package/build/src/queue/common/utils/find-booking-id.js +0 -10
- package/build/src/queue/common/utils/find-booking-id.spec.d.ts +0 -1
- package/build/src/queue/common/utils/find-booking-id.spec.js +0 -9
- package/build/src/queue/common/utils/format-queue-response.d.ts +0 -3
- package/build/src/queue/common/utils/format-queue-response.js +0 -12
- package/build/src/queue/common/utils/index.d.ts +0 -5
- package/build/src/queue/common/utils/index.js +0 -5
- package/build/src/queue/common/utils/interfaces/booking-text.interface.d.ts +0 -3
- package/build/src/queue/common/utils/interfaces/booking-text.interface.js +0 -1
- package/build/src/queue/common/utils/interfaces/format-queue-options.interface.d.ts +0 -11
- package/build/src/queue/common/utils/interfaces/format-queue-options.interface.js +0 -1
- package/build/src/queue/common/utils/interfaces/index.d.ts +0 -6
- package/build/src/queue/common/utils/interfaces/index.js +0 -6
- package/build/src/queue/common/utils/interfaces/queue-access.interface.d.ts +0 -21
- package/build/src/queue/common/utils/interfaces/queue-access.interface.js +0 -1
- package/build/src/queue/common/utils/interfaces/queue-count.interface.d.ts +0 -23
- package/build/src/queue/common/utils/interfaces/queue-count.interface.js +0 -1
- package/build/src/queue/common/utils/interfaces/queue-place.interface.d.ts +0 -8
- package/build/src/queue/common/utils/interfaces/queue-place.interface.js +0 -1
- package/build/src/queue/common/utils/interfaces/warnings-notifications-options.interface.d.ts +0 -5
- package/build/src/queue/common/utils/interfaces/warnings-notifications-options.interface.js +0 -1
- package/build/src/queue/common/utils/parse-paragraph-to-warnings.d.ts +0 -4
- package/build/src/queue/common/utils/parse-paragraph-to-warnings.js +0 -12
- package/build/src/queue/common/utils/parse-warnings-to-notifications.d.ts +0 -6
- package/build/src/queue/common/utils/parse-warnings-to-notifications.js +0 -4
- package/build/src/queue/common/utils/parse-xml-to-queue-access.d.ts +0 -2
- package/build/src/queue/common/utils/parse-xml-to-queue-access.js +0 -6
- package/build/src/queue/common/utils/parse-xml-to-queue-access.spec.d.ts +0 -1
- package/build/src/queue/common/utils/parse-xml-to-queue-access.spec.js +0 -135
- package/build/src/queue/common/utils/parse-xml-to-queue-count.d.ts +0 -2
- package/build/src/queue/common/utils/parse-xml-to-queue-count.js +0 -6
- package/build/src/queue/common/utils/parse-xml-to-queue-count.spec.d.ts +0 -1
- package/build/src/queue/common/utils/parse-xml-to-queue-count.spec.js +0 -67
- package/build/src/queue/common/utils/parse-xml-to-queue-place.d.ts +0 -2
- package/build/src/queue/common/utils/parse-xml-to-queue-place.js +0 -5
- package/build/src/queue/common/utils/parse-xml-to-queue-place.spec.d.ts +0 -1
- package/build/src/queue/common/utils/parse-xml-to-queue-place.spec.js +0 -88
- package/build/src/queue/interfaces/index.d.ts +0 -5
- package/build/src/queue/interfaces/index.js +0 -5
- package/build/src/queue/interfaces/queue-access-options.interface.d.ts +0 -7
- package/build/src/queue/interfaces/queue-access-options.interface.js +0 -1
- package/build/src/queue/interfaces/queue-count.interface.d.ts +0 -3
- package/build/src/queue/interfaces/queue-count.interface.js +0 -1
- package/build/src/queue/interfaces/queue-ignore.interface.d.ts +0 -3
- package/build/src/queue/interfaces/queue-ignore.interface.js +0 -1
- package/build/src/queue/interfaces/queue-place-options.interface.d.ts +0 -6
- package/build/src/queue/interfaces/queue-place-options.interface.js +0 -1
- package/build/src/queue/interfaces/queue-remove.interface.d.ts +0 -3
- package/build/src/queue/interfaces/queue-remove.interface.js +0 -1
- package/build/src/queue/queue.d.ts +0 -13
- package/build/src/queue/queue.js +0 -101
- package/build/src/sabre.d.ts +0 -31
- package/build/src/sabre.js +0 -141
package/README.md
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
# Sabre Node.js SDK
|
|
2
2
|
|
|
3
|
-
Node.js library for the Sabre API.
|
|
3
|
+
Node.js library for the Sabre API (SOAP).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
9
|
-
# or
|
|
10
|
-
yarn add @sabre/legacy-client
|
|
8
|
+
npm install sabre-legacy-client
|
|
11
9
|
```
|
|
12
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 { SabreLegacy } from 'sabre-legacy-client';
|
|
17
|
+
const sabre = new SabreLegacy({
|
|
18
|
+
username: '773400',
|
|
19
|
+
password: 'PASSWORD_GOES_HERE',
|
|
20
|
+
organization: '7TZA', // pcc
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
See http://developer.sabre.com
|
|
27
|
+
|
|
13
28
|
## License
|
|
14
29
|
|
|
15
30
|
MIT License
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
declare enum ActionsRQ {
|
|
2
|
+
SESSION_CREATE = "SessionCreateRQ",
|
|
3
|
+
SESSION_CLOSE = "SessionCloseRQ",
|
|
4
|
+
TOKEN_CREATE = "TokenCreateRQ",
|
|
5
|
+
QUEUE_COUNT = "QueueCountLLSRQ",
|
|
6
|
+
QUEUE_ACCESS = "QueueAccessLLSRQ",
|
|
7
|
+
QUEUE_PLACE = "QueuePlaceLLSRQ",
|
|
8
|
+
AGENCY_REPORT = "TKT_TravelAgencyReportsRQ",
|
|
9
|
+
DAILY_SALES_REPORT = "DailySalesReportLLSRQ",
|
|
10
|
+
PING = "OTA_PingRQ",
|
|
11
|
+
ENCODE_DECODE = "EncodeDecodeLLSRQ"
|
|
12
|
+
}
|
|
13
|
+
declare enum ActionsRS {
|
|
14
|
+
SESSION_CLOSE = "SessionCloseRS",
|
|
15
|
+
QUEUE_ACCESS = "QueueAccessLLSRS"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type Actions = ActionsRQ | ActionsRS;
|
|
19
|
+
interface SabreOptions {
|
|
20
|
+
username?: string;
|
|
21
|
+
password?: string;
|
|
22
|
+
organization?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface PostOptions {
|
|
26
|
+
query?: {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface HeadersRequestOptions {
|
|
32
|
+
authorization: string;
|
|
33
|
+
conversationId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class Authentication {
|
|
37
|
+
private readonly sabre;
|
|
38
|
+
constructor(sabre: Sabre);
|
|
39
|
+
sessionCreate(): Promise<string>;
|
|
40
|
+
sessionClose(): Promise<unknown>;
|
|
41
|
+
ping(): Promise<unknown>;
|
|
42
|
+
tokenCreate(): Promise<string>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface ApplicationResults {
|
|
46
|
+
success: {
|
|
47
|
+
systemSpecificResults?: {
|
|
48
|
+
hostCommad: {
|
|
49
|
+
content: string;
|
|
50
|
+
lNIATA: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
timeStamp: string;
|
|
54
|
+
};
|
|
55
|
+
status: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface QueueCountRS {
|
|
59
|
+
applicationResults: ApplicationResults;
|
|
60
|
+
queueInfo: QueueInfo;
|
|
61
|
+
total: QueueTotal[];
|
|
62
|
+
}
|
|
63
|
+
interface QueueInfo {
|
|
64
|
+
queueIdentifier: QueueIdentifier[];
|
|
65
|
+
dateTime: string;
|
|
66
|
+
pseudoCityCode: string;
|
|
67
|
+
}
|
|
68
|
+
interface QueueIdentifier {
|
|
69
|
+
count: string;
|
|
70
|
+
number: string;
|
|
71
|
+
}
|
|
72
|
+
interface QueueTotal {
|
|
73
|
+
count: string;
|
|
74
|
+
type: 'MESSAGE' | 'SPECIALS' | 'PNRS';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface Warning {
|
|
78
|
+
code: string;
|
|
79
|
+
message: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface Notification {
|
|
83
|
+
queue: string;
|
|
84
|
+
warning: Warning;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface FormatQueueResponse {
|
|
88
|
+
bookingId: string;
|
|
89
|
+
notifications: Array<Notification>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface QueueAccessOptions {
|
|
93
|
+
number: string;
|
|
94
|
+
pcc?: string;
|
|
95
|
+
}
|
|
96
|
+
interface QueueAccessResponse extends FormatQueueResponse {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface QueueCountResponse extends QueueCountRS {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface QueueIgnoreResponse extends QueueAccessResponse {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface QueuePlaceOptions extends QueueAccessOptions {
|
|
106
|
+
}
|
|
107
|
+
interface QueuePlaceResponse extends QueueAccessResponse {
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface QueueRemoveResponse extends QueueAccessResponse {
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare class Queue {
|
|
114
|
+
private readonly sabre;
|
|
115
|
+
private readonly meta;
|
|
116
|
+
constructor(sabre: Sabre);
|
|
117
|
+
count(pcc?: string): Promise<QueueCountResponse>;
|
|
118
|
+
access(payload: QueueAccessOptions): Promise<QueueAccessResponse>;
|
|
119
|
+
ignore(): Promise<QueueIgnoreResponse>;
|
|
120
|
+
remove(): Promise<QueueRemoveResponse>;
|
|
121
|
+
exit(): Promise<void>;
|
|
122
|
+
place(payload: QueuePlaceOptions): Promise<QueuePlaceResponse>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare const CUPON_TYPE: {
|
|
126
|
+
readonly F: "F";
|
|
127
|
+
readonly P: "P";
|
|
128
|
+
readonly E: "E";
|
|
129
|
+
};
|
|
130
|
+
type CuponType = keyof typeof CUPON_TYPE;
|
|
131
|
+
|
|
132
|
+
declare const DOCUMENT_TYPE: {
|
|
133
|
+
readonly TKT: "TKT";
|
|
134
|
+
readonly EMD: "EMD";
|
|
135
|
+
readonly RFEMD: "RFEMD";
|
|
136
|
+
readonly RFND: "RFND";
|
|
137
|
+
readonly MCO: "MCO";
|
|
138
|
+
};
|
|
139
|
+
type DocumentType = keyof typeof DOCUMENT_TYPE;
|
|
140
|
+
|
|
141
|
+
declare const SETTLEMENT_TYPE: {
|
|
142
|
+
readonly TAT: "TAT";
|
|
143
|
+
readonly TCH: "TCH";
|
|
144
|
+
readonly TKT: "TKT";
|
|
145
|
+
};
|
|
146
|
+
type SettlementType = keyof typeof SETTLEMENT_TYPE;
|
|
147
|
+
|
|
148
|
+
declare const TRANSACTION_TYPE: {
|
|
149
|
+
readonly SALE: "SALE";
|
|
150
|
+
readonly CNCL: "CNCL";
|
|
151
|
+
readonly RFND: "RFND";
|
|
152
|
+
readonly VOID: "VOID";
|
|
153
|
+
};
|
|
154
|
+
type TransactionType = keyof typeof TRANSACTION_TYPE;
|
|
155
|
+
|
|
156
|
+
interface SummaryOptions {
|
|
157
|
+
date: string;
|
|
158
|
+
pcc?: string;
|
|
159
|
+
airline?: {
|
|
160
|
+
code?: string;
|
|
161
|
+
number?: string;
|
|
162
|
+
};
|
|
163
|
+
settlementType?: SettlementType;
|
|
164
|
+
documentType?: DocumentType;
|
|
165
|
+
documentNumber?: string;
|
|
166
|
+
}
|
|
167
|
+
interface DailySalesSummaryResponseSuccess {
|
|
168
|
+
dailySalesSummaryRS: DailySalesSummaryRS;
|
|
169
|
+
}
|
|
170
|
+
interface DailySalesSummaryRS {
|
|
171
|
+
header: Header;
|
|
172
|
+
dSHeader: DSHeader;
|
|
173
|
+
dailySalesReport: DailySalesReport;
|
|
174
|
+
version: string;
|
|
175
|
+
isQueryStillRunning: string;
|
|
176
|
+
}
|
|
177
|
+
interface Header {
|
|
178
|
+
orchestrationID: {
|
|
179
|
+
content: string;
|
|
180
|
+
seq: string;
|
|
181
|
+
};
|
|
182
|
+
results: {
|
|
183
|
+
success: {
|
|
184
|
+
system: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
messageID: string;
|
|
188
|
+
}
|
|
189
|
+
interface DSHeader {
|
|
190
|
+
pseudoCityCode: string;
|
|
191
|
+
agencyName: string;
|
|
192
|
+
}
|
|
193
|
+
interface DailySalesReport {
|
|
194
|
+
reportDate: string;
|
|
195
|
+
transaction?: Array<Transaction>;
|
|
196
|
+
totalDailySales: TotalDailySales;
|
|
197
|
+
}
|
|
198
|
+
interface Transaction {
|
|
199
|
+
documentType: DocumentType;
|
|
200
|
+
settlementType: SettlementType;
|
|
201
|
+
pnrLocator?: string;
|
|
202
|
+
passengerName?: string;
|
|
203
|
+
documentDetails: {
|
|
204
|
+
documentNumber: string;
|
|
205
|
+
stockType?: string;
|
|
206
|
+
documentStatusCode?: string;
|
|
207
|
+
stockDetails?: {
|
|
208
|
+
cuponType: CuponType;
|
|
209
|
+
};
|
|
210
|
+
transactionCode: TransactionType;
|
|
211
|
+
};
|
|
212
|
+
airlineCode: {
|
|
213
|
+
content: string;
|
|
214
|
+
airlineNumber: string;
|
|
215
|
+
};
|
|
216
|
+
commission?: {
|
|
217
|
+
amount: string;
|
|
218
|
+
percent: string;
|
|
219
|
+
};
|
|
220
|
+
payments?: {
|
|
221
|
+
currencyCode: {
|
|
222
|
+
value: string;
|
|
223
|
+
decimalPlace: string;
|
|
224
|
+
};
|
|
225
|
+
documentPayment: {
|
|
226
|
+
paymentTotal: string;
|
|
227
|
+
paymentDetail: {
|
|
228
|
+
fop: string;
|
|
229
|
+
category: string;
|
|
230
|
+
cardType?: string;
|
|
231
|
+
paymentAmount: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
agentSine: string;
|
|
236
|
+
agentPseudoCity: string;
|
|
237
|
+
transactionDateTime: string;
|
|
238
|
+
}
|
|
239
|
+
interface TotalDailySales {
|
|
240
|
+
transactionType: TransactionType;
|
|
241
|
+
salesBySettlement: {
|
|
242
|
+
settlementType: SettlementType;
|
|
243
|
+
saleTotals: {
|
|
244
|
+
currencyCode: string;
|
|
245
|
+
cashTotals: {
|
|
246
|
+
content: number;
|
|
247
|
+
count: string;
|
|
248
|
+
};
|
|
249
|
+
creditTotals: {
|
|
250
|
+
content: number;
|
|
251
|
+
count: string;
|
|
252
|
+
};
|
|
253
|
+
commissionTotals: {
|
|
254
|
+
content: number;
|
|
255
|
+
count: string;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
interface ReportOptions {
|
|
262
|
+
date: string;
|
|
263
|
+
pcc?: string;
|
|
264
|
+
}
|
|
265
|
+
interface DailySalesReportResponseSuccess {
|
|
266
|
+
dailySalesReportRS: DailySalesReportRS;
|
|
267
|
+
}
|
|
268
|
+
interface DailySalesReportRS {
|
|
269
|
+
applicationResults: ApplicationResults;
|
|
270
|
+
salesReport?: SalesReport;
|
|
271
|
+
}
|
|
272
|
+
interface SalesReport {
|
|
273
|
+
creationDetails: {
|
|
274
|
+
source: {
|
|
275
|
+
agencyName: string;
|
|
276
|
+
createDateTime: string;
|
|
277
|
+
pseudoCityCode: string;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
issuanceData?: IssuanceData[];
|
|
281
|
+
}
|
|
282
|
+
interface IssuanceData {
|
|
283
|
+
agentSine: string;
|
|
284
|
+
commission: string;
|
|
285
|
+
documentType: string;
|
|
286
|
+
domesticInternational: string;
|
|
287
|
+
indicatorOne: string;
|
|
288
|
+
indicatorTwo: string;
|
|
289
|
+
issueTime: string;
|
|
290
|
+
itineraryRef: string;
|
|
291
|
+
stockItemCount: string;
|
|
292
|
+
ticketPrinter: string;
|
|
293
|
+
ticketStock: string;
|
|
294
|
+
payment: Payment[];
|
|
295
|
+
personName?: string;
|
|
296
|
+
ticketingInfo?: TicketingInfo;
|
|
297
|
+
ticketingFees?: TicketingFees;
|
|
298
|
+
}
|
|
299
|
+
interface Payment {
|
|
300
|
+
form: {
|
|
301
|
+
content: string;
|
|
302
|
+
amount: string;
|
|
303
|
+
currencyCode: string;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
interface TicketingInfo {
|
|
307
|
+
ticketing?: {
|
|
308
|
+
conjunctiveCount: string;
|
|
309
|
+
eTicketNumber: string;
|
|
310
|
+
ind: string;
|
|
311
|
+
invoiceNumber: string;
|
|
312
|
+
statusCode: string;
|
|
313
|
+
usedCount: string;
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
interface TicketingFees {
|
|
317
|
+
feeInformation?: {
|
|
318
|
+
amount: string;
|
|
319
|
+
guaranteeType: string;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare class DailySales {
|
|
324
|
+
private readonly sabre;
|
|
325
|
+
constructor(sabre: Sabre);
|
|
326
|
+
report(payload: ReportOptions): Promise<DailySalesReportRS>;
|
|
327
|
+
summary(payload: SummaryOptions): Promise<DailySalesSummaryRS>;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
interface UsernameTokenOptions {
|
|
331
|
+
username: string;
|
|
332
|
+
password: string;
|
|
333
|
+
pcc: string;
|
|
334
|
+
domain?: string;
|
|
335
|
+
clientId?: string;
|
|
336
|
+
clientSecret?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
interface SessionCreateOptions {
|
|
340
|
+
authorization: UsernameTokenOptions;
|
|
341
|
+
conversationId: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare class Sabre {
|
|
345
|
+
private readonly headers;
|
|
346
|
+
private readonly headersRequest;
|
|
347
|
+
private readonly options;
|
|
348
|
+
readonly authentication: Authentication;
|
|
349
|
+
readonly queue: Queue;
|
|
350
|
+
readonly dailySales: DailySales;
|
|
351
|
+
constructor(options: SabreOptions);
|
|
352
|
+
setAction(action: Actions): void;
|
|
353
|
+
fetchRequest<T>(options?: {}): Promise<T>;
|
|
354
|
+
post<T>(handlerRequest: (payload: HeadersRequestOptions) => string, options?: PostOptions): Promise<T>;
|
|
355
|
+
auth<T>(handlerRequest: (payload: SessionCreateOptions) => string, options?: PostOptions): Promise<T>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
declare class ErrorInResponse extends Error {
|
|
359
|
+
constructor(message: string);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
declare class FaultError extends Error {
|
|
363
|
+
constructor(message: string);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export { type DailySalesReportRS, type DailySalesReportResponseSuccess, type DailySalesSummaryRS, type DailySalesSummaryResponseSuccess, ErrorInResponse, FaultError, type QueueAccessOptions, type QueueAccessResponse, type QueueCountResponse, type QueueIgnoreResponse, type QueuePlaceOptions, type QueuePlaceResponse, type QueueRemoveResponse, type ReportOptions, Sabre as SabreLegacy, type SummaryOptions };
|