sabre-legacy-client 0.1.0 → 0.1.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 +2 -2
- package/dist/index.d.mts +398 -0
- package/dist/index.d.ts +398 -0
- package/dist/index.js +632 -0
- package/dist/index.mjs +612 -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
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
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
|
+
declare const SABRE_ERROR_CODES_BY_KEY: {
|
|
19
|
+
readonly missing_required_field: 422;
|
|
20
|
+
readonly invalid_access: 422;
|
|
21
|
+
readonly invalid_parameter: 422;
|
|
22
|
+
readonly invalid_region: 422;
|
|
23
|
+
readonly rate_limit_exceeded: 429;
|
|
24
|
+
readonly missing_api_key: 401;
|
|
25
|
+
readonly invalid_api_Key: 403;
|
|
26
|
+
readonly invalid_from_address: 403;
|
|
27
|
+
readonly validation_error: 403;
|
|
28
|
+
readonly not_found: 404;
|
|
29
|
+
readonly method_not_allowed: 405;
|
|
30
|
+
readonly error_in_response: 405;
|
|
31
|
+
readonly fault_error: 500;
|
|
32
|
+
readonly application_error: 500;
|
|
33
|
+
readonly internal_server_error: 500;
|
|
34
|
+
};
|
|
35
|
+
type SABRE_ERROR_CODE_KEY = keyof typeof SABRE_ERROR_CODES_BY_KEY;
|
|
36
|
+
interface ErrorResponse {
|
|
37
|
+
message: string;
|
|
38
|
+
name: SABRE_ERROR_CODE_KEY;
|
|
39
|
+
}
|
|
40
|
+
type Actions = ActionsRQ | ActionsRS;
|
|
41
|
+
|
|
42
|
+
interface PostOptions {
|
|
43
|
+
query?: {
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface HeadersRequestOptions {
|
|
49
|
+
authorization: string;
|
|
50
|
+
conversationId: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class Authentication {
|
|
54
|
+
private readonly sabre;
|
|
55
|
+
constructor(sabre: Sabre);
|
|
56
|
+
sessionCreate(): Promise<{
|
|
57
|
+
data: string | null;
|
|
58
|
+
error: ErrorResponse | null;
|
|
59
|
+
}>;
|
|
60
|
+
sessionClose(): Promise<{
|
|
61
|
+
data: unknown;
|
|
62
|
+
error: ErrorResponse | null;
|
|
63
|
+
}>;
|
|
64
|
+
ping(): Promise<{
|
|
65
|
+
data: unknown;
|
|
66
|
+
error: ErrorResponse | null;
|
|
67
|
+
}>;
|
|
68
|
+
tokenCreate(): Promise<{
|
|
69
|
+
data: string | null;
|
|
70
|
+
error: ErrorResponse | null;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ApplicationResults {
|
|
75
|
+
success: {
|
|
76
|
+
systemSpecificResults?: {
|
|
77
|
+
hostCommad: {
|
|
78
|
+
content: string;
|
|
79
|
+
lNIATA: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
timeStamp: string;
|
|
83
|
+
};
|
|
84
|
+
status: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface QueueCountRS {
|
|
88
|
+
applicationResults: ApplicationResults;
|
|
89
|
+
queueInfo: QueueInfo;
|
|
90
|
+
total: QueueTotal[];
|
|
91
|
+
}
|
|
92
|
+
interface QueueInfo {
|
|
93
|
+
queueIdentifier: QueueIdentifier[];
|
|
94
|
+
dateTime: string;
|
|
95
|
+
pseudoCityCode: string;
|
|
96
|
+
}
|
|
97
|
+
interface QueueIdentifier {
|
|
98
|
+
count: string;
|
|
99
|
+
number: string;
|
|
100
|
+
}
|
|
101
|
+
interface QueueTotal {
|
|
102
|
+
count: string;
|
|
103
|
+
type: 'MESSAGE' | 'SPECIALS' | 'PNRS';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface Warning {
|
|
107
|
+
code: string;
|
|
108
|
+
message: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface Notification {
|
|
112
|
+
queue: string;
|
|
113
|
+
warning: Warning;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface FormatQueueResponse {
|
|
117
|
+
bookingId: string;
|
|
118
|
+
notifications: Array<Notification>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface QueueAccessOptions {
|
|
122
|
+
number: string;
|
|
123
|
+
pcc?: string;
|
|
124
|
+
}
|
|
125
|
+
interface QueueAccessResponse extends FormatQueueResponse {
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface QueueCountResponse extends QueueCountRS {
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface QueueIgnoreResponse extends QueueAccessResponse {
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
interface QueuePlaceOptions extends QueueAccessOptions {
|
|
135
|
+
}
|
|
136
|
+
interface QueuePlaceResponse extends QueueAccessResponse {
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface QueueRemoveResponse extends QueueAccessResponse {
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare class Queue {
|
|
143
|
+
private readonly sabre;
|
|
144
|
+
private readonly meta;
|
|
145
|
+
constructor(sabre: Sabre);
|
|
146
|
+
count(pcc?: string): Promise<QueueCountResponse>;
|
|
147
|
+
access(payload: QueueAccessOptions): Promise<QueueAccessResponse>;
|
|
148
|
+
ignore(): Promise<QueueIgnoreResponse>;
|
|
149
|
+
remove(): Promise<QueueRemoveResponse>;
|
|
150
|
+
exit(): Promise<void>;
|
|
151
|
+
place(payload: QueuePlaceOptions): Promise<QueuePlaceResponse>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare const CUPON_TYPE: {
|
|
155
|
+
readonly F: "F";
|
|
156
|
+
readonly P: "P";
|
|
157
|
+
readonly E: "E";
|
|
158
|
+
};
|
|
159
|
+
type CuponType = keyof typeof CUPON_TYPE;
|
|
160
|
+
|
|
161
|
+
declare const DOCUMENT_TYPE: {
|
|
162
|
+
readonly TKT: "TKT";
|
|
163
|
+
readonly EMD: "EMD";
|
|
164
|
+
readonly RFEMD: "RFEMD";
|
|
165
|
+
readonly RFND: "RFND";
|
|
166
|
+
readonly MCO: "MCO";
|
|
167
|
+
};
|
|
168
|
+
type DocumentType = keyof typeof DOCUMENT_TYPE;
|
|
169
|
+
|
|
170
|
+
declare const SETTLEMENT_TYPE: {
|
|
171
|
+
readonly TAT: "TAT";
|
|
172
|
+
readonly TCH: "TCH";
|
|
173
|
+
readonly TKT: "TKT";
|
|
174
|
+
};
|
|
175
|
+
type SettlementType = keyof typeof SETTLEMENT_TYPE;
|
|
176
|
+
|
|
177
|
+
declare const TRANSACTION_TYPE: {
|
|
178
|
+
readonly SALE: "SALE";
|
|
179
|
+
readonly CNCL: "CNCL";
|
|
180
|
+
readonly RFND: "RFND";
|
|
181
|
+
readonly VOID: "VOID";
|
|
182
|
+
};
|
|
183
|
+
type TransactionType = keyof typeof TRANSACTION_TYPE;
|
|
184
|
+
|
|
185
|
+
interface SummaryOptions {
|
|
186
|
+
date: string;
|
|
187
|
+
pcc?: string;
|
|
188
|
+
airline?: {
|
|
189
|
+
code?: string;
|
|
190
|
+
number?: string;
|
|
191
|
+
};
|
|
192
|
+
settlementType?: SettlementType;
|
|
193
|
+
documentType?: DocumentType;
|
|
194
|
+
documentNumber?: string;
|
|
195
|
+
}
|
|
196
|
+
interface DailySalesSummaryResponseSuccess {
|
|
197
|
+
dailySalesSummaryRS: DailySalesSummaryRS;
|
|
198
|
+
}
|
|
199
|
+
interface DailySalesSummaryRS {
|
|
200
|
+
header: Header;
|
|
201
|
+
dSHeader: DSHeader;
|
|
202
|
+
dailySalesReport: DailySalesReport;
|
|
203
|
+
version: string;
|
|
204
|
+
isQueryStillRunning: string;
|
|
205
|
+
}
|
|
206
|
+
interface Header {
|
|
207
|
+
orchestrationID: {
|
|
208
|
+
content: string;
|
|
209
|
+
seq: string;
|
|
210
|
+
};
|
|
211
|
+
results: {
|
|
212
|
+
success: {
|
|
213
|
+
system: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
messageID: string;
|
|
217
|
+
}
|
|
218
|
+
interface DSHeader {
|
|
219
|
+
pseudoCityCode: string;
|
|
220
|
+
agencyName: string;
|
|
221
|
+
}
|
|
222
|
+
interface DailySalesReport {
|
|
223
|
+
reportDate: string;
|
|
224
|
+
transaction?: Array<Transaction>;
|
|
225
|
+
totalDailySales: TotalDailySales;
|
|
226
|
+
}
|
|
227
|
+
interface Transaction {
|
|
228
|
+
documentType: DocumentType;
|
|
229
|
+
settlementType: SettlementType;
|
|
230
|
+
pnrLocator?: string;
|
|
231
|
+
passengerName?: string;
|
|
232
|
+
documentDetails: {
|
|
233
|
+
documentNumber: string;
|
|
234
|
+
stockType?: string;
|
|
235
|
+
documentStatusCode?: string;
|
|
236
|
+
stockDetails?: {
|
|
237
|
+
cuponType: CuponType;
|
|
238
|
+
};
|
|
239
|
+
transactionCode: TransactionType;
|
|
240
|
+
};
|
|
241
|
+
airlineCode: {
|
|
242
|
+
content: string;
|
|
243
|
+
airlineNumber: string;
|
|
244
|
+
};
|
|
245
|
+
commission?: {
|
|
246
|
+
amount: string;
|
|
247
|
+
percent: string;
|
|
248
|
+
};
|
|
249
|
+
payments?: {
|
|
250
|
+
currencyCode: {
|
|
251
|
+
value: string;
|
|
252
|
+
decimalPlace: string;
|
|
253
|
+
};
|
|
254
|
+
documentPayment: {
|
|
255
|
+
paymentTotal: string;
|
|
256
|
+
paymentDetail: {
|
|
257
|
+
fop: string;
|
|
258
|
+
category: string;
|
|
259
|
+
cardType?: string;
|
|
260
|
+
paymentAmount: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
agentSine: string;
|
|
265
|
+
agentPseudoCity: string;
|
|
266
|
+
transactionDateTime: string;
|
|
267
|
+
}
|
|
268
|
+
interface TotalDailySales {
|
|
269
|
+
transactionType: TransactionType;
|
|
270
|
+
salesBySettlement: {
|
|
271
|
+
settlementType: SettlementType;
|
|
272
|
+
saleTotals: {
|
|
273
|
+
currencyCode: string;
|
|
274
|
+
cashTotals: {
|
|
275
|
+
content: number;
|
|
276
|
+
count: string;
|
|
277
|
+
};
|
|
278
|
+
creditTotals: {
|
|
279
|
+
content: number;
|
|
280
|
+
count: string;
|
|
281
|
+
};
|
|
282
|
+
commissionTotals: {
|
|
283
|
+
content: number;
|
|
284
|
+
count: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
interface ReportOptions {
|
|
291
|
+
date: string;
|
|
292
|
+
pcc?: string;
|
|
293
|
+
}
|
|
294
|
+
interface DailySalesReportResponseSuccess {
|
|
295
|
+
dailySalesReportRS: DailySalesReportRS;
|
|
296
|
+
}
|
|
297
|
+
interface DailySalesReportRS {
|
|
298
|
+
applicationResults: ApplicationResults;
|
|
299
|
+
salesReport?: SalesReport;
|
|
300
|
+
}
|
|
301
|
+
interface SalesReport {
|
|
302
|
+
creationDetails: {
|
|
303
|
+
source: {
|
|
304
|
+
agencyName: string;
|
|
305
|
+
createDateTime: string;
|
|
306
|
+
pseudoCityCode: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
issuanceData?: IssuanceData[];
|
|
310
|
+
}
|
|
311
|
+
interface IssuanceData {
|
|
312
|
+
agentSine: string;
|
|
313
|
+
commission: string;
|
|
314
|
+
documentType: string;
|
|
315
|
+
domesticInternational: string;
|
|
316
|
+
indicatorOne: string;
|
|
317
|
+
indicatorTwo: string;
|
|
318
|
+
issueTime: string;
|
|
319
|
+
itineraryRef: string;
|
|
320
|
+
stockItemCount: string;
|
|
321
|
+
ticketPrinter: string;
|
|
322
|
+
ticketStock: string;
|
|
323
|
+
payment: Payment[];
|
|
324
|
+
personName?: string;
|
|
325
|
+
ticketingInfo?: TicketingInfo;
|
|
326
|
+
ticketingFees?: TicketingFees;
|
|
327
|
+
}
|
|
328
|
+
interface Payment {
|
|
329
|
+
form: {
|
|
330
|
+
content: string;
|
|
331
|
+
amount: string;
|
|
332
|
+
currencyCode: string;
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
interface TicketingInfo {
|
|
336
|
+
ticketing?: {
|
|
337
|
+
conjunctiveCount: string;
|
|
338
|
+
eTicketNumber: string;
|
|
339
|
+
ind: string;
|
|
340
|
+
invoiceNumber: string;
|
|
341
|
+
statusCode: string;
|
|
342
|
+
usedCount: string;
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
interface TicketingFees {
|
|
346
|
+
feeInformation?: {
|
|
347
|
+
amount: string;
|
|
348
|
+
guaranteeType: string;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
declare class DailySales {
|
|
353
|
+
private readonly sabre;
|
|
354
|
+
constructor(sabre: Sabre);
|
|
355
|
+
report(payload: ReportOptions): Promise<DailySalesReportRS>;
|
|
356
|
+
summary(payload: SummaryOptions): Promise<DailySalesSummaryRS>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
interface UsernameTokenOptions {
|
|
360
|
+
username: string;
|
|
361
|
+
password: string;
|
|
362
|
+
pcc: string;
|
|
363
|
+
domain?: string;
|
|
364
|
+
clientId?: string;
|
|
365
|
+
clientSecret?: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface SessionCreateOptions {
|
|
369
|
+
authorization: UsernameTokenOptions;
|
|
370
|
+
conversationId: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare class Sabre {
|
|
374
|
+
private readonly username?;
|
|
375
|
+
private readonly password?;
|
|
376
|
+
private readonly organization?;
|
|
377
|
+
private readonly headers;
|
|
378
|
+
private readonly headersRequest;
|
|
379
|
+
readonly authentication: Authentication;
|
|
380
|
+
readonly queue: Queue;
|
|
381
|
+
readonly dailySales: DailySales;
|
|
382
|
+
constructor(username?: string | undefined, password?: string | undefined, organization?: string | undefined);
|
|
383
|
+
setAction(action: Actions): void;
|
|
384
|
+
fetchRequest<T>(options?: {}): Promise<{
|
|
385
|
+
data: T | null;
|
|
386
|
+
error: ErrorResponse | null;
|
|
387
|
+
}>;
|
|
388
|
+
post<T>(handlerRequest: (payload: HeadersRequestOptions) => string, options?: PostOptions): Promise<{
|
|
389
|
+
data: T | null;
|
|
390
|
+
error: ErrorResponse | null;
|
|
391
|
+
}>;
|
|
392
|
+
auth<T>(handlerRequest: (payload: SessionCreateOptions) => string, options?: PostOptions): Promise<{
|
|
393
|
+
data: T | null;
|
|
394
|
+
error: ErrorResponse | null;
|
|
395
|
+
}>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export { type DailySalesReportRS, type DailySalesReportResponseSuccess, type DailySalesSummaryRS, type DailySalesSummaryResponseSuccess, type ErrorResponse, Sabre as LegacySabre, type QueueAccessOptions, type QueueAccessResponse, type QueueCountResponse, type QueueIgnoreResponse, type QueuePlaceOptions, type QueuePlaceResponse, type QueueRemoveResponse, type ReportOptions, type SummaryOptions };
|