korail-mobile-api 2.0.1__py3-none-any.whl
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.
- korail_mobile_api/__init__.py +477 -0
- korail_mobile_api/_maas_unsupported.py +60 -0
- korail_mobile_api/_parsing.py +254 -0
- korail_mobile_api/_payload_helpers.py +32 -0
- korail_mobile_api/_social_login_unsupported.py +47 -0
- korail_mobile_api/_travel_search_unsupported.py +35 -0
- korail_mobile_api/client.py +2001 -0
- korail_mobile_api/config.py +102 -0
- korail_mobile_api/constants.py +254 -0
- korail_mobile_api/crypto.py +67 -0
- korail_mobile_api/dynapath.py +412 -0
- korail_mobile_api/errors.py +515 -0
- korail_mobile_api/http.py +394 -0
- korail_mobile_api/limousine_models.py +135 -0
- korail_mobile_api/limousine_parsers.py +183 -0
- korail_mobile_api/limousine_payloads.py +61 -0
- korail_mobile_api/live.py +77 -0
- korail_mobile_api/models.py +846 -0
- korail_mobile_api/mutation_models.py +844 -0
- korail_mobile_api/mutation_parsers.py +566 -0
- korail_mobile_api/mutation_payloads.py +1453 -0
- korail_mobile_api/netfunnel.py +351 -0
- korail_mobile_api/netfunnel_safety.py +39 -0
- korail_mobile_api/parsers.py +729 -0
- korail_mobile_api/payloads.py +346 -0
- korail_mobile_api/py.typed +0 -0
- korail_mobile_api/read_models.py +1997 -0
- korail_mobile_api/read_parsers.py +2805 -0
- korail_mobile_api/read_payloads.py +1298 -0
- korail_mobile_api/session.py +232 -0
- korail_mobile_api-2.0.1.dist-info/METADATA +276 -0
- korail_mobile_api-2.0.1.dist-info/RECORD +35 -0
- korail_mobile_api-2.0.1.dist-info/WHEEL +5 -0
- korail_mobile_api-2.0.1.dist-info/licenses/LICENSE +202 -0
- korail_mobile_api-2.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
# korail-mobile-api — https://github.com/yakisoba0728/korail-mobile-api
|
|
2
|
+
# Copyright (c) 2026 yakisoba0728
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
"""공개 진입점은 __all__이며 그 밖의 이름은 내부 구현입니다."""
|
|
6
|
+
|
|
7
|
+
__version__ = "2.0.1"
|
|
8
|
+
|
|
9
|
+
from .client import KorailClient
|
|
10
|
+
from .config import KorailConfig
|
|
11
|
+
from .constants import (
|
|
12
|
+
KorailLoginInputFlag,
|
|
13
|
+
KorailReservationJobType,
|
|
14
|
+
KorailRoomClassCode,
|
|
15
|
+
KorailSeatClass,
|
|
16
|
+
)
|
|
17
|
+
from .dynapath import (
|
|
18
|
+
DynapathConfig,
|
|
19
|
+
DynapathRequestContext,
|
|
20
|
+
DynapathTokenProvider,
|
|
21
|
+
DynapathTokenSettings,
|
|
22
|
+
)
|
|
23
|
+
from .errors import (
|
|
24
|
+
KorailApiError,
|
|
25
|
+
KorailAppError,
|
|
26
|
+
KorailAppUpdateRequiredError,
|
|
27
|
+
KorailAuthContinuationRequired,
|
|
28
|
+
KorailAuthError,
|
|
29
|
+
KorailDynaPathError,
|
|
30
|
+
KorailDynaPathRequiredError,
|
|
31
|
+
KorailInvalidRequestError,
|
|
32
|
+
KorailNetFunnelError,
|
|
33
|
+
KorailNoDirectTrainError,
|
|
34
|
+
KorailNoResultsError,
|
|
35
|
+
KorailNotEntitledError,
|
|
36
|
+
KorailProtocolError,
|
|
37
|
+
KorailQueueRejectedError,
|
|
38
|
+
KorailReservationRefusedError,
|
|
39
|
+
KorailSeatUnavailableError,
|
|
40
|
+
KorailServiceUnavailableError,
|
|
41
|
+
KorailSessionExpiredError,
|
|
42
|
+
KorailSoldOutError,
|
|
43
|
+
KorailTransportError,
|
|
44
|
+
)
|
|
45
|
+
from .limousine_models import (
|
|
46
|
+
LimousineSchedule,
|
|
47
|
+
LimousineScheduleQuery,
|
|
48
|
+
LimousineScheduleResponse,
|
|
49
|
+
LimousineSeat,
|
|
50
|
+
LimousineSeatInventoryQuery,
|
|
51
|
+
LimousineSeatInventoryResponse,
|
|
52
|
+
)
|
|
53
|
+
from .live import build_config_from_env
|
|
54
|
+
from .models import (
|
|
55
|
+
AppDataResponse,
|
|
56
|
+
AppVersionInfo,
|
|
57
|
+
BaseKorailResponse,
|
|
58
|
+
KorailSession,
|
|
59
|
+
KorailStation,
|
|
60
|
+
MaasMenuItem,
|
|
61
|
+
MaasMenuListResponse,
|
|
62
|
+
NoticeResponse,
|
|
63
|
+
PhysicalSeat,
|
|
64
|
+
ReservationPassengerInfo,
|
|
65
|
+
SeatAttribute,
|
|
66
|
+
SeatCar,
|
|
67
|
+
SeatCarListResponse,
|
|
68
|
+
SeatInventoryResponse,
|
|
69
|
+
SeatWindow,
|
|
70
|
+
StationDataResponse,
|
|
71
|
+
StationInfoResponse,
|
|
72
|
+
TrainCalendarDay,
|
|
73
|
+
TrainCalendarResponse,
|
|
74
|
+
TrainScheduleResponse,
|
|
75
|
+
TrainScheduleStop,
|
|
76
|
+
TrainSearchContinuation,
|
|
77
|
+
TrainSearchMetadata,
|
|
78
|
+
TrainSearchQuery,
|
|
79
|
+
TrainSearchResult,
|
|
80
|
+
TrainSummary,
|
|
81
|
+
TransferItinerary,
|
|
82
|
+
TransferSearchResult,
|
|
83
|
+
TransferStation,
|
|
84
|
+
TransferStationListResponse,
|
|
85
|
+
UuidResponse,
|
|
86
|
+
)
|
|
87
|
+
from .mutation_models import (
|
|
88
|
+
CardPayment,
|
|
89
|
+
CartAddRequest,
|
|
90
|
+
CartAddResponse,
|
|
91
|
+
CartDiscountAddition,
|
|
92
|
+
DeliveredTicketRetrievalResponse,
|
|
93
|
+
DiscountCardAdditionalUser,
|
|
94
|
+
DiscountCardPurchaseRequest,
|
|
95
|
+
DiscountCardPurchaseResponse,
|
|
96
|
+
DiscountCardSectionRequest,
|
|
97
|
+
DiscountCardTicket,
|
|
98
|
+
KorailPassengerCounts,
|
|
99
|
+
KorailSeatAssignment,
|
|
100
|
+
PaidTicket,
|
|
101
|
+
PriceRecalculationRequest,
|
|
102
|
+
PriceRecalculationRow,
|
|
103
|
+
ProductCancelResponse,
|
|
104
|
+
RefundTicketResponse,
|
|
105
|
+
ReservationHoldResponse,
|
|
106
|
+
ReservationJourney,
|
|
107
|
+
ReservationPaymentCoupon,
|
|
108
|
+
ReservationPaymentResponse,
|
|
109
|
+
ReservationPaymentSettlement,
|
|
110
|
+
ReservationPaymentTableSeat,
|
|
111
|
+
ReservationPaymentTicket,
|
|
112
|
+
SelfCheckInCancelResponse,
|
|
113
|
+
SelfCheckInRegisterResponse,
|
|
114
|
+
StationRefundExecutionRequest,
|
|
115
|
+
StationRefundExecutionResponse,
|
|
116
|
+
StationRefundOriginalTicket,
|
|
117
|
+
StationRefundVerificationRequest,
|
|
118
|
+
StationRefundVerificationResponse,
|
|
119
|
+
)
|
|
120
|
+
from .read_models import (
|
|
121
|
+
CartItem,
|
|
122
|
+
CartListResponse,
|
|
123
|
+
CommuterInfoResponse,
|
|
124
|
+
CommuterKindMenuResponse,
|
|
125
|
+
CommuterPassengerOption,
|
|
126
|
+
CrewRequestListResponse,
|
|
127
|
+
CrewRequestOption,
|
|
128
|
+
CustomerTripInfo,
|
|
129
|
+
CustomerTripInfoResponse,
|
|
130
|
+
DelayCertificateResponse,
|
|
131
|
+
DelayCertificateRow,
|
|
132
|
+
DelayDiscountTicket,
|
|
133
|
+
DelayDiscountTicketListResponse,
|
|
134
|
+
DelayReturnReceiptResponse,
|
|
135
|
+
DeliveryRecipientResponse,
|
|
136
|
+
DepositBank,
|
|
137
|
+
DepositBankListResponse,
|
|
138
|
+
DiscountCardOnTicket,
|
|
139
|
+
DiscountCardScheduleResponse,
|
|
140
|
+
DiscountCardScheduleTrain,
|
|
141
|
+
DiscountCardSection,
|
|
142
|
+
DiscountCardUsage,
|
|
143
|
+
DiscountCardUsageListResponse,
|
|
144
|
+
DiscountCoupon,
|
|
145
|
+
DiscountCouponListResponse,
|
|
146
|
+
FreeSeatCarResponse,
|
|
147
|
+
GuideSeatConditionResponse,
|
|
148
|
+
IntermediateStation,
|
|
149
|
+
KorailPointSummaryResponse,
|
|
150
|
+
MaasServiceDetail,
|
|
151
|
+
MaasServiceDetailInfo,
|
|
152
|
+
MaasServiceDetailListResponse,
|
|
153
|
+
MergeSeatsInquiryResponse,
|
|
154
|
+
MileageHistoryEntry,
|
|
155
|
+
MileageHistoryResponse,
|
|
156
|
+
MultiChildDiscountTarget,
|
|
157
|
+
MultiChildDiscountTargetResponse,
|
|
158
|
+
OriginalTicket,
|
|
159
|
+
OriginalTicketInquiryResponse,
|
|
160
|
+
OriginalTicketJourney,
|
|
161
|
+
OriginalTicketSeat,
|
|
162
|
+
PassAgeOption,
|
|
163
|
+
PassAvailabilityMainInfo,
|
|
164
|
+
PassAvailabilityResponse,
|
|
165
|
+
PassGoodsInfo,
|
|
166
|
+
PassMenuData,
|
|
167
|
+
PassMenuItem,
|
|
168
|
+
PassMenuResponse,
|
|
169
|
+
PassOffice,
|
|
170
|
+
PassOpenDate,
|
|
171
|
+
PassPassengerInfo,
|
|
172
|
+
PassPassengerInfos,
|
|
173
|
+
PassPeriodOption,
|
|
174
|
+
PassScheduleInfo,
|
|
175
|
+
PassScheduleMainInfo,
|
|
176
|
+
PassScheduleResponse,
|
|
177
|
+
PassScheduleTrain,
|
|
178
|
+
PbpAcceptanceJourney,
|
|
179
|
+
PbpAcceptanceSeat,
|
|
180
|
+
PbpAcceptanceSpecificationResponse,
|
|
181
|
+
PbpAcceptanceTicket,
|
|
182
|
+
PriceFare,
|
|
183
|
+
PriceFareQuoteResponse,
|
|
184
|
+
ProductDetailResponse,
|
|
185
|
+
ProductReservation,
|
|
186
|
+
ProductReservationListResponse,
|
|
187
|
+
ReceiptCashPayment,
|
|
188
|
+
ReceiptPayment,
|
|
189
|
+
RecentDeliveryHistoryResponse,
|
|
190
|
+
RecentDeliveryRecipient,
|
|
191
|
+
RefundCommissionResponse,
|
|
192
|
+
RefundTicketDetailResponse,
|
|
193
|
+
RefundTicketJourney,
|
|
194
|
+
RefundTicketSeat,
|
|
195
|
+
ReservationDetailJourney,
|
|
196
|
+
ReservationHistoryJourney,
|
|
197
|
+
ReservationHistoryOriginalTicket,
|
|
198
|
+
ReservationHistoryPassenger,
|
|
199
|
+
ReservationHistoryReservation,
|
|
200
|
+
ReservationHistoryResponse,
|
|
201
|
+
ReservationHistoryTicket,
|
|
202
|
+
ReservationHistoryTrain,
|
|
203
|
+
ReservationSeatDetail,
|
|
204
|
+
SeatAssignmentScheduleResponse,
|
|
205
|
+
SelfCheckInInfoResponse,
|
|
206
|
+
SelfCheckInSeat,
|
|
207
|
+
SelfCheckInSeatCheckResponse,
|
|
208
|
+
SelfSeatChangeInfoResponse,
|
|
209
|
+
SelfSeatChangeReason,
|
|
210
|
+
SelfSeatChangeStation,
|
|
211
|
+
ServiceStatusResponse,
|
|
212
|
+
TicketDuplicationCheckResponse,
|
|
213
|
+
TicketListReservation,
|
|
214
|
+
TicketListResponse,
|
|
215
|
+
TicketListTicket,
|
|
216
|
+
TicketListTrain,
|
|
217
|
+
TicketReceipt,
|
|
218
|
+
TicketReceiptResponse,
|
|
219
|
+
TicketReservationDetailResponse,
|
|
220
|
+
TrainScheduleItem,
|
|
221
|
+
TripChangeDateResponse,
|
|
222
|
+
TripMenuContent,
|
|
223
|
+
TripMenuItem,
|
|
224
|
+
TripMenuResponse,
|
|
225
|
+
)
|
|
226
|
+
from .read_payloads import (
|
|
227
|
+
CommuterInfoRequest,
|
|
228
|
+
CommuterInitialRequest,
|
|
229
|
+
CommuterPassengerRequest,
|
|
230
|
+
CommuterTicketInquiryRequest,
|
|
231
|
+
DiscountCardScheduleRequest,
|
|
232
|
+
FreeSeatCarRequest,
|
|
233
|
+
GuideSeatConditionRequest,
|
|
234
|
+
KorailMileageLedger,
|
|
235
|
+
KorailMileageMovement,
|
|
236
|
+
KorailSelfSeatChangeRoomClassCode,
|
|
237
|
+
MaasServiceDetailQuery,
|
|
238
|
+
MergeSeatsInquiryRequest,
|
|
239
|
+
MileageHistoryRequest,
|
|
240
|
+
OriginalTicketReference,
|
|
241
|
+
PassScheduleRequest,
|
|
242
|
+
PriceFareLeg,
|
|
243
|
+
PriceFareQuoteRequest,
|
|
244
|
+
RefundCompanion,
|
|
245
|
+
SeatAssignmentScheduleRequest,
|
|
246
|
+
SelfSeatChangeInfoRequest,
|
|
247
|
+
TicketDuplicationCheckRequest,
|
|
248
|
+
TicketReservationDetailRequest,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
__all__ = [
|
|
252
|
+
"AppDataResponse",
|
|
253
|
+
"AppVersionInfo",
|
|
254
|
+
"BaseKorailResponse",
|
|
255
|
+
"CartAddRequest",
|
|
256
|
+
"CartAddResponse",
|
|
257
|
+
"CartDiscountAddition",
|
|
258
|
+
"CartItem",
|
|
259
|
+
"CartListResponse",
|
|
260
|
+
"CommuterKindMenuResponse",
|
|
261
|
+
"CommuterInfoRequest",
|
|
262
|
+
"CommuterInfoResponse",
|
|
263
|
+
"CommuterInitialRequest",
|
|
264
|
+
"CommuterPassengerOption",
|
|
265
|
+
"CommuterPassengerRequest",
|
|
266
|
+
"CommuterTicketInquiryRequest",
|
|
267
|
+
"CrewRequestListResponse",
|
|
268
|
+
"CrewRequestOption",
|
|
269
|
+
"CustomerTripInfo",
|
|
270
|
+
"CustomerTripInfoResponse",
|
|
271
|
+
"DelayCertificateResponse",
|
|
272
|
+
"DelayCertificateRow",
|
|
273
|
+
"DelayReturnReceiptResponse",
|
|
274
|
+
"DeliveredTicketRetrievalResponse",
|
|
275
|
+
"DynapathConfig",
|
|
276
|
+
"DynapathRequestContext",
|
|
277
|
+
"DynapathTokenProvider",
|
|
278
|
+
"DynapathTokenSettings",
|
|
279
|
+
"DelayDiscountTicket",
|
|
280
|
+
"DelayDiscountTicketListResponse",
|
|
281
|
+
"DeliveryRecipientResponse",
|
|
282
|
+
"DepositBank",
|
|
283
|
+
"DepositBankListResponse",
|
|
284
|
+
"DiscountCardScheduleRequest",
|
|
285
|
+
"DiscountCardAdditionalUser",
|
|
286
|
+
"DiscountCardOnTicket",
|
|
287
|
+
"DiscountCardPurchaseRequest",
|
|
288
|
+
"DiscountCardPurchaseResponse",
|
|
289
|
+
"DiscountCardScheduleResponse",
|
|
290
|
+
"DiscountCardScheduleTrain",
|
|
291
|
+
"DiscountCardSection",
|
|
292
|
+
"DiscountCardSectionRequest",
|
|
293
|
+
"DiscountCardTicket",
|
|
294
|
+
"DiscountCardUsage",
|
|
295
|
+
"DiscountCardUsageListResponse",
|
|
296
|
+
"DiscountCoupon",
|
|
297
|
+
"DiscountCouponListResponse",
|
|
298
|
+
"FreeSeatCarRequest",
|
|
299
|
+
"FreeSeatCarResponse",
|
|
300
|
+
"GuideSeatConditionRequest",
|
|
301
|
+
"GuideSeatConditionResponse",
|
|
302
|
+
"IntermediateStation",
|
|
303
|
+
"KorailApiError",
|
|
304
|
+
"KorailAppError",
|
|
305
|
+
"KorailAppUpdateRequiredError",
|
|
306
|
+
"KorailAuthContinuationRequired",
|
|
307
|
+
"KorailAuthError",
|
|
308
|
+
"KorailClient",
|
|
309
|
+
"KorailConfig",
|
|
310
|
+
"KorailDynaPathError",
|
|
311
|
+
"KorailDynaPathRequiredError",
|
|
312
|
+
"KorailInvalidRequestError",
|
|
313
|
+
"KorailNetFunnelError",
|
|
314
|
+
"KorailNoDirectTrainError",
|
|
315
|
+
"KorailNoResultsError",
|
|
316
|
+
"KorailNotEntitledError",
|
|
317
|
+
"KorailPassengerCounts",
|
|
318
|
+
"KorailQueueRejectedError",
|
|
319
|
+
"KorailLoginInputFlag",
|
|
320
|
+
"KorailRoomClassCode",
|
|
321
|
+
"KorailReservationJobType",
|
|
322
|
+
"KorailReservationRefusedError",
|
|
323
|
+
"KorailProtocolError",
|
|
324
|
+
"KorailSeatAssignment",
|
|
325
|
+
"KorailSeatClass",
|
|
326
|
+
"KorailSeatUnavailableError",
|
|
327
|
+
"KorailServiceUnavailableError",
|
|
328
|
+
"KorailStation",
|
|
329
|
+
"KorailSession",
|
|
330
|
+
"KorailSessionExpiredError",
|
|
331
|
+
"KorailSoldOutError",
|
|
332
|
+
"KorailTransportError",
|
|
333
|
+
"LimousineSchedule",
|
|
334
|
+
"LimousineScheduleQuery",
|
|
335
|
+
"LimousineScheduleResponse",
|
|
336
|
+
"LimousineSeat",
|
|
337
|
+
"LimousineSeatInventoryQuery",
|
|
338
|
+
"LimousineSeatInventoryResponse",
|
|
339
|
+
"MaasMenuItem",
|
|
340
|
+
"MaasMenuListResponse",
|
|
341
|
+
"MaasServiceDetail",
|
|
342
|
+
"MaasServiceDetailInfo",
|
|
343
|
+
"MaasServiceDetailListResponse",
|
|
344
|
+
"MaasServiceDetailQuery",
|
|
345
|
+
"MergeSeatsInquiryRequest",
|
|
346
|
+
"MergeSeatsInquiryResponse",
|
|
347
|
+
"KorailMileageLedger",
|
|
348
|
+
"KorailMileageMovement",
|
|
349
|
+
"KorailPointSummaryResponse",
|
|
350
|
+
"KorailSelfSeatChangeRoomClassCode",
|
|
351
|
+
"MileageHistoryEntry",
|
|
352
|
+
"MileageHistoryRequest",
|
|
353
|
+
"MileageHistoryResponse",
|
|
354
|
+
"MultiChildDiscountTarget",
|
|
355
|
+
"MultiChildDiscountTargetResponse",
|
|
356
|
+
"NoticeResponse",
|
|
357
|
+
"OriginalTicket",
|
|
358
|
+
"OriginalTicketInquiryResponse",
|
|
359
|
+
"OriginalTicketJourney",
|
|
360
|
+
"OriginalTicketReference",
|
|
361
|
+
"OriginalTicketSeat",
|
|
362
|
+
"PhysicalSeat",
|
|
363
|
+
"PassAvailabilityMainInfo",
|
|
364
|
+
"PassAvailabilityResponse",
|
|
365
|
+
"PassAgeOption",
|
|
366
|
+
"PassGoodsInfo",
|
|
367
|
+
"PassMenuData",
|
|
368
|
+
"PassMenuItem",
|
|
369
|
+
"PassMenuResponse",
|
|
370
|
+
"PassScheduleInfo",
|
|
371
|
+
"PassScheduleMainInfo",
|
|
372
|
+
"PassScheduleRequest",
|
|
373
|
+
"PassScheduleResponse",
|
|
374
|
+
"PassScheduleTrain",
|
|
375
|
+
"PassOffice",
|
|
376
|
+
"PassOpenDate",
|
|
377
|
+
"PassPassengerInfo",
|
|
378
|
+
"PassPassengerInfos",
|
|
379
|
+
"PassPeriodOption",
|
|
380
|
+
"PbpAcceptanceJourney",
|
|
381
|
+
"PbpAcceptanceSeat",
|
|
382
|
+
"PbpAcceptanceSpecificationResponse",
|
|
383
|
+
"PbpAcceptanceTicket",
|
|
384
|
+
"ProductCancelResponse",
|
|
385
|
+
"ProductDetailResponse",
|
|
386
|
+
"ProductReservation",
|
|
387
|
+
"ProductReservationListResponse",
|
|
388
|
+
"PriceFare",
|
|
389
|
+
"PriceFareLeg",
|
|
390
|
+
"PriceFareQuoteRequest",
|
|
391
|
+
"PriceFareQuoteResponse",
|
|
392
|
+
"RecentDeliveryHistoryResponse",
|
|
393
|
+
"RecentDeliveryRecipient",
|
|
394
|
+
"ReceiptCashPayment",
|
|
395
|
+
"ReceiptPayment",
|
|
396
|
+
"RefundCommissionResponse",
|
|
397
|
+
"RefundCompanion",
|
|
398
|
+
"RefundTicketDetailResponse",
|
|
399
|
+
"RefundTicketJourney",
|
|
400
|
+
"RefundTicketSeat",
|
|
401
|
+
"RefundTicketResponse",
|
|
402
|
+
"SelfCheckInCancelResponse",
|
|
403
|
+
"SelfCheckInInfoResponse",
|
|
404
|
+
"SelfCheckInRegisterResponse",
|
|
405
|
+
"SelfCheckInSeat",
|
|
406
|
+
"SelfCheckInSeatCheckResponse",
|
|
407
|
+
"StationRefundExecutionRequest",
|
|
408
|
+
"StationRefundExecutionResponse",
|
|
409
|
+
"StationRefundOriginalTicket",
|
|
410
|
+
"StationRefundVerificationRequest",
|
|
411
|
+
"StationRefundVerificationResponse",
|
|
412
|
+
"ReservationDetailJourney",
|
|
413
|
+
"ReservationHistoryJourney",
|
|
414
|
+
"ReservationHistoryOriginalTicket",
|
|
415
|
+
"ReservationHistoryPassenger",
|
|
416
|
+
"ReservationHistoryReservation",
|
|
417
|
+
"ReservationHistoryResponse",
|
|
418
|
+
"ReservationHistoryTicket",
|
|
419
|
+
"ReservationHistoryTrain",
|
|
420
|
+
"ReservationSeatDetail",
|
|
421
|
+
"CardPayment",
|
|
422
|
+
"PaidTicket",
|
|
423
|
+
"PriceRecalculationRequest",
|
|
424
|
+
"PriceRecalculationRow",
|
|
425
|
+
"ReservationHoldResponse",
|
|
426
|
+
"ReservationJourney",
|
|
427
|
+
"ReservationPaymentCoupon",
|
|
428
|
+
"ReservationPaymentResponse",
|
|
429
|
+
"ReservationPaymentSettlement",
|
|
430
|
+
"ReservationPaymentTableSeat",
|
|
431
|
+
"ReservationPaymentTicket",
|
|
432
|
+
"ReservationPassengerInfo",
|
|
433
|
+
"SeatAttribute",
|
|
434
|
+
"SeatCar",
|
|
435
|
+
"SeatCarListResponse",
|
|
436
|
+
"SeatInventoryResponse",
|
|
437
|
+
"SeatAssignmentScheduleRequest",
|
|
438
|
+
"SeatAssignmentScheduleResponse",
|
|
439
|
+
"SeatWindow",
|
|
440
|
+
"SelfSeatChangeInfoRequest",
|
|
441
|
+
"SelfSeatChangeInfoResponse",
|
|
442
|
+
"SelfSeatChangeReason",
|
|
443
|
+
"SelfSeatChangeStation",
|
|
444
|
+
"ServiceStatusResponse",
|
|
445
|
+
"build_config_from_env",
|
|
446
|
+
"StationDataResponse",
|
|
447
|
+
"StationInfoResponse",
|
|
448
|
+
"TrainCalendarDay",
|
|
449
|
+
"TrainCalendarResponse",
|
|
450
|
+
"TrainSearchContinuation",
|
|
451
|
+
"TrainSearchQuery",
|
|
452
|
+
"TrainSearchMetadata",
|
|
453
|
+
"TrainSearchResult",
|
|
454
|
+
"TrainScheduleResponse",
|
|
455
|
+
"TrainScheduleStop",
|
|
456
|
+
"TrainScheduleItem",
|
|
457
|
+
"TrainSummary",
|
|
458
|
+
"TransferItinerary",
|
|
459
|
+
"TransferSearchResult",
|
|
460
|
+
"TicketReceipt",
|
|
461
|
+
"TicketReceiptResponse",
|
|
462
|
+
"TicketReservationDetailRequest",
|
|
463
|
+
"TicketReservationDetailResponse",
|
|
464
|
+
"TicketDuplicationCheckRequest",
|
|
465
|
+
"TicketDuplicationCheckResponse",
|
|
466
|
+
"TicketListReservation",
|
|
467
|
+
"TicketListResponse",
|
|
468
|
+
"TicketListTicket",
|
|
469
|
+
"TicketListTrain",
|
|
470
|
+
"TripMenuContent",
|
|
471
|
+
"TripMenuItem",
|
|
472
|
+
"TripMenuResponse",
|
|
473
|
+
"TripChangeDateResponse",
|
|
474
|
+
"TransferStation",
|
|
475
|
+
"TransferStationListResponse",
|
|
476
|
+
"UuidResponse",
|
|
477
|
+
]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# korail-mobile-api — https://github.com/yakisoba0728/korail-mobile-api
|
|
2
|
+
# Copyright (c) 2026 yakisoba0728
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
"""공개하지 않는 부가서비스 호출을 기록합니다. 패키지 내부에서 가져오지 않으며 KorailClient에도 노출하지 않습니다.
|
|
6
|
+
|
|
7
|
+
확인된 앱 흐름은 중계 페이지(/ebizmaas/EbizMaasShopView.do)가 요청번호(EbizMaasAddSrvReqNo.do)를 발급하고, /js/maas/maas_shop.js가 암호화된
|
|
8
|
+
고객 정보를 제휴사에 넘겨 상품 선택 후 장바구니 행을 만드는 방식입니다. 이 라이브러리는 그 웹 흐름과 보호된 통합결제(pay.intgStl.do)·환불(addService.coptCnc.do)
|
|
9
|
+
상수를 재현하지 않습니다. 2026-09-24 기준 아래 세 호출은 실서버 검증 못 함이므로 지원하지 않습니다.
|
|
10
|
+
|
|
11
|
+
관련 빌더는 read_payloads.build_maas_cancel_fee_form·build_maas_cart_status_form과
|
|
12
|
+
mutation_payloads.build_maas_cancel_form이며, 응답은 read_parsers·mutation_parsers에서 처리합니다."""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import TYPE_CHECKING
|
|
17
|
+
|
|
18
|
+
from .models import BaseKorailResponse
|
|
19
|
+
from .mutation_models import MaasCancelResponse
|
|
20
|
+
from .mutation_parsers import parse_maas_cancel_response
|
|
21
|
+
from .mutation_payloads import build_maas_cancel_form
|
|
22
|
+
from .read_models import CartItem, MaasCancelFeeResponse, MaasServiceDetail
|
|
23
|
+
from .read_parsers import parse_maas_cancel_fee_response
|
|
24
|
+
from .read_payloads import build_maas_cancel_fee_form, build_maas_cart_status_form
|
|
25
|
+
|
|
26
|
+
if TYPE_CHECKING:
|
|
27
|
+
from .client import KorailClient
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get_maas_cancel_fee(client: KorailClient, item: MaasServiceDetail) -> MaasCancelFeeResponse:
|
|
31
|
+
"""결제된 부가서비스의 환불 수수료를 조회하는 미지원 호출을 기록합니다. item은 get_maas_service_details의
|
|
32
|
+
행입니다(MyTicketDetailViewModel.java:840-860)."""
|
|
33
|
+
client._require_session()
|
|
34
|
+
return client._post_read(
|
|
35
|
+
"/classes/com.korail.mobile.maas.cncFee.do",
|
|
36
|
+
build_maas_cancel_fee_form(item),
|
|
37
|
+
parser=parse_maas_cancel_fee_response,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def check_maas_cart_status(client: KorailClient, item: CartItem) -> BaseKorailResponse:
|
|
42
|
+
"""결제 직전 부가서비스 장바구니 상태를 확인하는 미지원 호출을 기록합니다. 앱은 실패 시 결제 화면으로 이동하지 않습니다(BasketTicketViewModel.java:1690-1800).
|
|
43
|
+
응답은 공통 봉투뿐입니다."""
|
|
44
|
+
client._require_session()
|
|
45
|
+
return client._post_read(
|
|
46
|
+
"/classes/com.korail.mobile.maas.rsvStt.do",
|
|
47
|
+
build_maas_cart_status_form(item),
|
|
48
|
+
parser=BaseKorailResponse.from_raw,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def cancel_unpaid_maas_item(client: KorailClient, item: CartItem) -> MaasCancelResponse:
|
|
53
|
+
"""미결제 부가서비스를 해제하는 미지원 변경 호출을 기록합니다. pnr_no가 빈 장바구니 행만
|
|
54
|
+
받습니다(BasketTicketViewModel.java:3080-3160,5692-5723)."""
|
|
55
|
+
customer_no = client._require_customer_no("MaaS cancel")
|
|
56
|
+
return client._mutation(
|
|
57
|
+
"/classes/com.korail.mobile.addService.cancelPay.do",
|
|
58
|
+
build_maas_cancel_form(client.config, item, customer_no=customer_no),
|
|
59
|
+
parser=parse_maas_cancel_response,
|
|
60
|
+
)
|