sm-types 1.11.21 → 1.11.23
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/common/enums.d.ts +11 -1
- package/common/enums.js +13 -1
- package/common/index.d.ts +7 -0
- package/package.json +1 -1
- package/sm-rails/index.d.ts +77 -0
- package/sm-rails/index.js +2 -0
package/common/enums.d.ts
CHANGED
|
@@ -74,7 +74,8 @@ export declare enum ServiceType {
|
|
|
74
74
|
BUS = "bus",
|
|
75
75
|
RIDE = "ride",
|
|
76
76
|
SMARTRIPS = "smartrips",
|
|
77
|
-
INSURANCE = "insurance"
|
|
77
|
+
INSURANCE = "insurance",
|
|
78
|
+
RAIL = "RAIL"
|
|
78
79
|
}
|
|
79
80
|
export declare enum OfferStatus {
|
|
80
81
|
APPROVAL_DECLINED = "APPROVAL_DECLINED",
|
|
@@ -120,3 +121,12 @@ export declare enum BookingConfirmationStatus {
|
|
|
120
121
|
FAILED = "FAILED",
|
|
121
122
|
NOT_SURE = "NOT_SURE"
|
|
122
123
|
}
|
|
124
|
+
export declare enum RailClass {
|
|
125
|
+
FIRST_CLASS = "First class",
|
|
126
|
+
SECOND_CLASS = "Second class",
|
|
127
|
+
CONVENTIONAL = "Conventional"
|
|
128
|
+
}
|
|
129
|
+
export declare enum TripLink {
|
|
130
|
+
CONNECTION = "connection",
|
|
131
|
+
DIRECT = "direct"
|
|
132
|
+
}
|
package/common/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookingConfirmationStatus = exports.CredentialTypeEnum = exports.OfferStatus = exports.ServiceType = exports.BookingStatus = exports.NavanStatus = exports.BookingFeeStatus = exports.EmailType = exports.IndicationStatus = exports.IndicationRewardStatus = exports.JustificationPolicy = exports.CabinClass = exports.DealOwnerEnum = exports.SuppliersEnum = exports.RentabilityTypeEnum = exports.TravelCustomFieldEnum = void 0;
|
|
3
|
+
exports.TripLink = exports.RailClass = exports.BookingConfirmationStatus = exports.CredentialTypeEnum = exports.OfferStatus = exports.ServiceType = exports.BookingStatus = exports.NavanStatus = exports.BookingFeeStatus = exports.EmailType = exports.IndicationStatus = exports.IndicationRewardStatus = exports.JustificationPolicy = exports.CabinClass = exports.DealOwnerEnum = exports.SuppliersEnum = exports.RentabilityTypeEnum = exports.TravelCustomFieldEnum = void 0;
|
|
4
4
|
var TravelCustomFieldEnum;
|
|
5
5
|
(function (TravelCustomFieldEnum) {
|
|
6
6
|
TravelCustomFieldEnum["TRIP_PURPOSE"] = "TRIP_PURPOSE";
|
|
@@ -91,6 +91,7 @@ var ServiceType;
|
|
|
91
91
|
ServiceType["RIDE"] = "ride";
|
|
92
92
|
ServiceType["SMARTRIPS"] = "smartrips";
|
|
93
93
|
ServiceType["INSURANCE"] = "insurance";
|
|
94
|
+
ServiceType["RAIL"] = "RAIL";
|
|
94
95
|
})(ServiceType = exports.ServiceType || (exports.ServiceType = {}));
|
|
95
96
|
var OfferStatus;
|
|
96
97
|
(function (OfferStatus) {
|
|
@@ -114,3 +115,14 @@ var BookingConfirmationStatus;
|
|
|
114
115
|
BookingConfirmationStatus["FAILED"] = "FAILED";
|
|
115
116
|
BookingConfirmationStatus["NOT_SURE"] = "NOT_SURE";
|
|
116
117
|
})(BookingConfirmationStatus = exports.BookingConfirmationStatus || (exports.BookingConfirmationStatus = {}));
|
|
118
|
+
var RailClass;
|
|
119
|
+
(function (RailClass) {
|
|
120
|
+
RailClass["FIRST_CLASS"] = "First class";
|
|
121
|
+
RailClass["SECOND_CLASS"] = "Second class";
|
|
122
|
+
RailClass["CONVENTIONAL"] = "Conventional";
|
|
123
|
+
})(RailClass = exports.RailClass || (exports.RailClass = {}));
|
|
124
|
+
var TripLink;
|
|
125
|
+
(function (TripLink) {
|
|
126
|
+
TripLink["CONNECTION"] = "connection";
|
|
127
|
+
TripLink["DIRECT"] = "direct";
|
|
128
|
+
})(TripLink = exports.TripLink || (exports.TripLink = {}));
|
package/common/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ISmCarContractDetails, ISmCarDetails, ISmCarRentalDetails, ISmCarSupplierInfo } from '../sm-car-rentals';
|
|
2
2
|
import { EventPrivacy } from '../sm-company-events/enums';
|
|
3
|
+
import { IRailTrip } from '../sm-rails';
|
|
3
4
|
import { CabinClass, JustificationPolicy } from './enums';
|
|
4
5
|
import * as SharedTypes from './shared';
|
|
5
6
|
export * from './enums';
|
|
@@ -392,3 +393,9 @@ export type InviteEventEmailData = {
|
|
|
392
393
|
};
|
|
393
394
|
appUrl: string;
|
|
394
395
|
};
|
|
396
|
+
export interface IRailJSON {
|
|
397
|
+
search: IOfferSearch;
|
|
398
|
+
returnTrip: Nullable<IRailTrip>;
|
|
399
|
+
departureTrip: IRailTrip;
|
|
400
|
+
international: boolean;
|
|
401
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { RailClass, TripLink } from "../common";
|
|
2
|
+
export interface IRailTripSchedule {
|
|
3
|
+
place: string;
|
|
4
|
+
date: string;
|
|
5
|
+
hour: string;
|
|
6
|
+
weekDay: string;
|
|
7
|
+
latitude: string;
|
|
8
|
+
longitude: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IPriceWithCurrency {
|
|
11
|
+
currency: string;
|
|
12
|
+
value: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IRailTrip {
|
|
15
|
+
type: TripLink;
|
|
16
|
+
from: string;
|
|
17
|
+
to: string;
|
|
18
|
+
price: IPriceWithCurrency;
|
|
19
|
+
departure: IRailTripSchedule;
|
|
20
|
+
arrival: IRailTripSchedule;
|
|
21
|
+
parts: IRailTripPart[];
|
|
22
|
+
totalStops: number;
|
|
23
|
+
duration: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SeatPreference {
|
|
26
|
+
mandatorySelection: boolean;
|
|
27
|
+
place: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IRailPolicy {
|
|
30
|
+
fee: IPriceWithCurrency;
|
|
31
|
+
free: boolean;
|
|
32
|
+
freeUntil: string;
|
|
33
|
+
}
|
|
34
|
+
interface IRailTicket {
|
|
35
|
+
station: string;
|
|
36
|
+
company: string;
|
|
37
|
+
number: number;
|
|
38
|
+
feeType: string;
|
|
39
|
+
class: RailClass;
|
|
40
|
+
seatPreferences: SeatPreference;
|
|
41
|
+
cancelPolicy: IRailPolicy;
|
|
42
|
+
changePolicy: IRailPolicy;
|
|
43
|
+
}
|
|
44
|
+
export interface IRailTripPart {
|
|
45
|
+
price: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
ticketInfo: IRailTicket;
|
|
48
|
+
durationHours: string;
|
|
49
|
+
departure: {
|
|
50
|
+
place: {
|
|
51
|
+
station: string;
|
|
52
|
+
city: string;
|
|
53
|
+
state: string;
|
|
54
|
+
country: string;
|
|
55
|
+
};
|
|
56
|
+
schedule: {
|
|
57
|
+
date: string;
|
|
58
|
+
time: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
arrival: {
|
|
62
|
+
place: {
|
|
63
|
+
station: string;
|
|
64
|
+
city: string;
|
|
65
|
+
state: string;
|
|
66
|
+
country: string;
|
|
67
|
+
};
|
|
68
|
+
schedule: {
|
|
69
|
+
date: string;
|
|
70
|
+
time: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
baggage: boolean;
|
|
74
|
+
boardingPass: boolean;
|
|
75
|
+
electronicBoardingPass: boolean;
|
|
76
|
+
}
|
|
77
|
+
export {};
|