sm-types 1.5.1 → 1.5.3

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.
Files changed (58) hide show
  1. package/{dist/common → common}/index.d.ts +0 -0
  2. package/{dist/common → common}/index.js +0 -0
  3. package/{dist/common → common}/shared/index.d.ts +0 -0
  4. package/{dist/common → common}/shared/index.js +0 -0
  5. package/{dist/errors → errors}/index.d.ts +0 -0
  6. package/{dist/errors → errors}/index.js +0 -0
  7. package/errors/user/create-user.d.ts +4 -0
  8. package/{dist/errors → errors}/user/create-user.js +0 -0
  9. package/{dist/errors → errors}/user/index.d.ts +0 -0
  10. package/{dist/errors → errors}/user/index.js +0 -0
  11. package/package.json +2 -2
  12. package/{dist/sm-airlines → sm-airlines}/command-params/index.d.ts +0 -0
  13. package/{dist/sm-airlines → sm-airlines}/command-params/index.js +0 -0
  14. package/{dist/sm-airlines → sm-airlines}/dtos/index.d.ts +0 -0
  15. package/{dist/sm-airlines → sm-airlines}/dtos/index.js +0 -0
  16. package/{dist/sm-airlines → sm-airlines}/dtos/request.d.ts +0 -0
  17. package/{dist/sm-airlines → sm-airlines}/dtos/request.js +0 -0
  18. package/{dist/sm-airlines → sm-airlines}/dtos/response.d.ts +0 -0
  19. package/{dist/sm-airlines → sm-airlines}/dtos/response.js +0 -0
  20. package/{dist/sm-airlines → sm-airlines}/index.d.ts +0 -0
  21. package/{dist/sm-airlines → sm-airlines}/index.js +0 -0
  22. package/{dist/sm-azul → sm-azul}/index.d.ts +0 -0
  23. package/{dist/sm-azul → sm-azul}/index.js +0 -0
  24. package/{dist/sm-azul → sm-azul}/shared/index.d.ts +0 -0
  25. package/{dist/sm-azul → sm-azul}/shared/index.js +0 -0
  26. package/{dist/sm-car-rentals → sm-car-rentals}/index.d.ts +0 -0
  27. package/{dist/sm-car-rentals → sm-car-rentals}/index.js +0 -0
  28. package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.d.ts +0 -0
  29. package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.js +0 -0
  30. package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.d.ts +0 -0
  31. package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.js +0 -0
  32. package/{dist/sm-tech → sm-tech}/index.d.ts +0 -0
  33. package/{dist/sm-tech → sm-tech}/index.js +0 -0
  34. package/{dist/sm-tech → sm-tech}/shared/index.d.ts +0 -0
  35. package/{dist/sm-tech → sm-tech}/shared/index.js +0 -0
  36. package/{dist/sm-wcf → sm-wcf}/index.d.ts +0 -0
  37. package/{dist/sm-wcf → sm-wcf}/index.js +0 -0
  38. package/dist/README.md +0 -3
  39. package/dist/errors/user/create-user.d.ts +0 -4
  40. package/dist/package.json +0 -35
  41. package/src/common/index.ts +0 -13
  42. package/src/common/shared/index.ts +0 -16
  43. package/src/errors/index.ts +0 -1
  44. package/src/errors/user/create-user.ts +0 -5
  45. package/src/errors/user/index.ts +0 -1
  46. package/src/sm-airlines/command-params/index.ts +0 -30
  47. package/src/sm-airlines/dtos/index.ts +0 -20
  48. package/src/sm-airlines/dtos/request.ts +0 -44
  49. package/src/sm-airlines/dtos/response.ts +0 -73
  50. package/src/sm-airlines/index.ts +0 -672
  51. package/src/sm-azul/index.ts +0 -231
  52. package/src/sm-azul/shared/index.ts +0 -895
  53. package/src/sm-car-rentals/index.ts +0 -163
  54. package/src/sm-car-rentals/localiza/index.ts +0 -12
  55. package/src/sm-car-rentals/movida/index.ts +0 -11
  56. package/src/sm-tech/index.ts +0 -137
  57. package/src/sm-tech/shared/index.ts +0 -116
  58. package/src/sm-wcf/index.ts +0 -201
@@ -1,163 +0,0 @@
1
- export interface ISmCarsAgency {
2
- code: string;
3
- active: boolean;
4
- airport: boolean;
5
- name: string;
6
- address: string;
7
- city: string;
8
- country: string;
9
- uf: string;
10
- latitude: number;
11
- longitude: number;
12
- }
13
-
14
- export interface ISmCarsAgencyCombination {
15
- pickup: ISmCarsAgency;
16
- dropoff: ISmCarsAgency;
17
- }
18
-
19
- export const SteeringType = {
20
- HYDRAULIC: "hydraulic",
21
- ELETRIC: "eletric",
22
- COMMON: "common",
23
- } as const;
24
-
25
- export const TransmissionType = {
26
- MANUAL :"manual",
27
- AUTOMATIC :"automatic",
28
- } as const;
29
-
30
- export const FeeType = {
31
- SERVICE_FEE: "serviceFee",
32
- RETURN_FEE: "returnFee",
33
- } as const;
34
-
35
- type ValueOf<T> = T[keyof T];
36
- export type TSteeringType = ValueOf<typeof SteeringType>
37
- export type TTransmissionType = ValueOf<typeof TransmissionType>
38
- export type TFeeType = ValueOf<typeof FeeType>
39
-
40
- export interface ISmCarFeatures {
41
- passengers: number;
42
- doors: number | null;
43
- baggages: number;
44
- abs: boolean;
45
- airbag: boolean;
46
- steering: TSteeringType | null;
47
- transmission: TTransmissionType | null;
48
- air: boolean;
49
- }
50
-
51
- export interface ISmCarDetails {
52
- modelTitle: string;
53
- class: string;
54
- type: string;
55
- modelDescription: string;
56
- image: string;
57
- features: ISmCarFeatures;
58
- supplierCarGroupCode: string;
59
- sippCode: string;
60
- }
61
-
62
- interface ISmCarContractFeatures {
63
- ldw: boolean;
64
- ali: boolean;
65
- unlimitedKm: boolean;
66
- mandatoryDriverCreditCard: boolean;
67
- }
68
-
69
- export interface ISmCarPriceInfo {
70
- rawPrice: number;
71
- discount: number;
72
- netPrice: number;
73
- quantity: number;
74
- total: number;
75
- }
76
-
77
- export interface ISmCarFeeInfo {
78
- name: TFeeType;
79
- total: number;
80
- }
81
-
82
- export interface ISmCarAdditionalPriceInfo {
83
- name: string;
84
- supplierCategory: string;
85
- supplierId: number | null;
86
- selected: boolean;
87
- allowChange: boolean;
88
- rawPrice: number;
89
- discount: number;
90
- netPrice: number;
91
- quantity: number;
92
- total: number;
93
- }
94
-
95
- export interface ISmCarFinalPriceInfo {
96
- rawTotal: number;
97
- discount: number;
98
- netTotal: number;
99
- }
100
-
101
- export interface ISmCarContractDetails {
102
- features: ISmCarContractFeatures;
103
- freeCancelationUntil: string;
104
- dailyInfo: ISmCarPriceInfo;
105
- extraHoursInfo: ISmCarPriceInfo;
106
- feesInfo: ISmCarFeeInfo[];
107
- additionalsInfo: ISmCarAdditionalPriceInfo[];
108
- finalPriceInfo: ISmCarFinalPriceInfo;
109
- }
110
-
111
- export interface ISmCarSupplierInfo {
112
- id: string;
113
- supplier: string;
114
- }
115
-
116
- export interface ISmCarOffer {
117
- supplierInfo: ISmCarSupplierInfo;
118
- carDetails: ISmCarDetails;
119
- contractDetails: ISmCarContractDetails;
120
- }
121
-
122
- export interface ISmCarCompleteOffer {
123
- supplierInfo: ISmCarSupplierInfo;
124
- carDetails: ISmCarDetails;
125
- contractDetails: ISmCarContractDetails;
126
- rentalDetails: ISmCarRentalDetails;
127
- pickup: ISmCarOfferAgency;
128
- dropoff: ISmCarOfferAgency;
129
- }
130
-
131
- export interface ISmCarRentalDetails {
132
- logo: string;
133
- id: string;
134
- name: string;
135
- }
136
- export interface ISmCarOfferAgency {
137
- storeCode: string;
138
- storeName: string;
139
- address: string;
140
- date: string;
141
- time: string;
142
- latitude: string;
143
- longitude: string;
144
- }
145
-
146
- export interface OfferAddResponse {
147
- offerId: string;
148
- createdOffer: ISmCarCompleteOffer;
149
- }
150
- export interface OfferAddResponseData {
151
- status: string;
152
- data: OfferAddResponse;
153
- message?: string;
154
- }
155
- export interface ListOffersResponse {
156
- offers: ISmCarCompleteOffer[];
157
- expirationTime: Date;
158
- }
159
- export interface ListOffersResponseData {
160
- status: string;
161
- data: ListOffersResponse;
162
- message?: string;
163
- }
@@ -1,12 +0,0 @@
1
- export interface IGetCarByAgencyRequestDto {
2
- pickupStoreCode: string;
3
- dropoffStoreCode: string;
4
- pickupHour: number;
5
- pickupMinute: number;
6
- pickupDate: string;
7
- dropoffHour: number;
8
- dropoffMinute: number;
9
- dropoffDate: string;
10
- agencyCode?: string;
11
- customerCode?: string;
12
- }
@@ -1,11 +0,0 @@
1
- export interface IGetCarByAgencyRequestDto {
2
- pickupStoreCode: string;
3
- dropoffStoreCode: string;
4
- pickupHour: number;
5
- pickupMinute: number;
6
- pickupDate: string;
7
- dropoffHour: number;
8
- dropoffMinute: number;
9
- dropoffDate: string;
10
- customerCode?: string;
11
- }
@@ -1,137 +0,0 @@
1
- import { IPaymentMethod } from '../common';
2
- import { IOfferStatus, IPriceDetails } from '../sm-airlines';
3
- import * as SharedTypes from './shared'
4
- export * from './shared';
5
-
6
- export interface ICredentials {
7
- login: string;
8
- password: string;
9
- apiKey: string;
10
- }
11
-
12
- export interface IRoute {
13
- date: string;
14
- departureStation: string;
15
- arrivalStation: string;
16
- }
17
-
18
- export interface IPaxInfo {
19
- adults: number;
20
- children: number;
21
- babies: number;
22
- }
23
-
24
- export interface ISearchConfigurations {
25
- systems: SharedTypes.ISystemType[];
26
- onlyTarifsWithLuggage?: boolean;
27
- onlyDirectFlights?: boolean;
28
- preFilterOffers?: boolean;
29
- }
30
-
31
- export interface ISearchData {
32
- routes: IRoute[];
33
- paxInfo: IPaxInfo;
34
- config: ISearchConfigurations;
35
- }
36
-
37
- export interface IListOffersInfo {
38
- searchId: string;
39
- offers: SharedTypes.ISmTTravelOffer[];
40
- }
41
-
42
- export interface ITarifiedOfferInfo {
43
- paxType: string;
44
- priceDetails: IPriceDetails;
45
- }
46
-
47
- export interface IServiceOrderInfo {
48
- serviceOrderId: string;
49
- status: IOfferStatus | string;
50
- recordLocator: string;
51
- consultingKey: string;
52
- createdAt: Date;
53
- reservedUntil: Date;
54
- system: SharedTypes.ISystemType;
55
- }
56
-
57
- export interface ICheckReserveInfo {
58
- availability: boolean;
59
- reservedUntil?: Date;
60
- currentPrice: number;
61
- selectedPrice: number;
62
- priceDetails: IPriceDetails | null;
63
- tariffInfo: SharedTypes.ITariffInfo | null;
64
- chargeDetails: SharedTypes.IChargeDetails | null;
65
- }
66
-
67
- export interface IGetEmissionDataInfo {
68
- cardBrands: ICardBrandItem[];
69
- paymentMethods: {
70
- credit_card: boolean;
71
- billed: boolean;
72
- };
73
- total: number;
74
- }
75
-
76
- export interface ICardBrandItem {
77
- code: string;
78
- brandName: string;
79
- }
80
-
81
- export interface IGetInstallmentsArgs {
82
- paymentMethod: IPaymentMethod;
83
- creditCardBrandCode: string;
84
- system: SharedTypes.ISystemType;
85
- total: number;
86
- }
87
-
88
- export interface IGetInstallmentsInfo {
89
- installmentOptions: IInstallmentOption[];
90
- }
91
-
92
- export interface IInstallmentOption {
93
- installments: number;
94
- firstInstallmentValue: number;
95
- otherInstallmentsValue: number;
96
- total: number;
97
- totalInterest: number;
98
- }
99
-
100
- export interface IEmitOfferArgs {
101
- serviceOrderInfo: IServiceOrderInfo;
102
- paymentMethod: IPaymentMethod;
103
- creditCardBrandCode?: string;
104
- installments?: number;
105
- }
106
-
107
- export interface IEmitOfferInfo {
108
- isEmitted: boolean;
109
- bookingCode: string;
110
- recordLocator: string;
111
- price: number;
112
- tariffInfo: SharedTypes.ITariffInfo | null;
113
- authorizationCode: string;
114
- emittedAt: Date;
115
- }
116
-
117
- export interface ICancelReserveArgs {
118
- serviceOrderInfo: IServiceOrderInfo;
119
- }
120
-
121
- export interface ICancelReserveInfo {
122
- canceled: boolean;
123
- }
124
-
125
- export interface ICancelTicketArgs {
126
- bookingCode: string;
127
- serviceOrderInfo: IServiceOrderInfo;
128
- }
129
-
130
- export interface ICancelTicketInfo {
131
- canceled: boolean;
132
- }
133
-
134
- export interface ICheckChargeDetailsInfo {
135
- chargeDetails?: SharedTypes.IChargeDetails;
136
- priceDetails: IPriceDetails;
137
- }
@@ -1,116 +0,0 @@
1
- export const SystemType = {
2
- LATAM: 'LATAM',
3
- GOL: 'GOL',
4
- GOLGWS: 'GOLGWS',
5
- AZUL: 'AZUL',
6
- PASSAREDO: 'PASSAREDO',
7
- SABRE: 'SABRE',
8
- ITAPEMIRIM: 'ITAPEMIRIM',
9
- AMADEUS: 'AMADEUS',
10
- AMADEUSWS: 'AMADEUSWS'
11
- } as const;
12
-
13
- export const JourneyType = {
14
- INBOUND: 'inbound',
15
- OUTBOUND: 'outbound'
16
- } as const;
17
-
18
- export const PaymentMethodType = {
19
- InCash: 'À Vista',
20
- CustomerCard: 'Cartão Cliente',
21
- CreditCard: 'Cartão de Crédito',
22
- TravelerCard: 'Cartão Viajante'
23
- } as const;
24
-
25
- export enum OfferStatus {
26
- Canceled = 'Cancelada',
27
- Emitted = 'Emitida'
28
- };
29
-
30
- // create types based on object values
31
- type ValueOf<T> = T[keyof T];
32
- export type ISystemType = ValueOf<typeof SystemType>;
33
- export type IJourneyType = ValueOf<typeof JourneyType>;
34
- export type IPaymentMethodType = ValueOf<typeof PaymentMethodType>;
35
-
36
- export interface ISmTTravelOffer {
37
- searchId: string;
38
- ttravelOfferId: number;
39
- outboundJourney: IRawJourney;
40
- inboundJourney?: IRawJourney;
41
- }
42
-
43
- export interface IRawJourney {
44
- journeyId: number;
45
- segments: IRawSegment[];
46
- journeyType: IJourneyType;
47
- segmentsCount: number;
48
- totalDuration: string;
49
- baseTotal: number;
50
- baseTarif: number;
51
- company: string;
52
- departureHour: string;
53
- arrivalHour: string;
54
- departureDate: string;
55
- arrivalDate: string;
56
- diffArrivalDate: boolean;
57
- fare?: IFareFamily;
58
- filterTotalDuration: string;
59
- }
60
-
61
- export interface IRawSegment {
62
- segmentId: number;
63
- journeyId: number;
64
- route: string;
65
- originAirport: string;
66
- destinationAirport: string;
67
- stops: string;
68
- departureHour: string;
69
- arrivalHour: string;
70
- departureDate: string;
71
- arrivalDate: string;
72
- connection: string;
73
- system: ISystemType;
74
- carrier: string;
75
- company: string;
76
- flightNumber: string;
77
- duration: string;
78
- flightType: string;
79
- fareFamilies: IFareFamily[];
80
- }
81
-
82
- export interface IFareFamily {
83
- fareId: number;
84
- class: string;
85
- availableCount: number;
86
- fareBasis: string;
87
- farePrice: string;
88
- boardingFee: string;
89
- duFee: string;
90
- totalPrice: string;
91
- fareClassName: string;
92
- baggageCount: number;
93
- discountCode: string;
94
- netValue: string;
95
- }
96
-
97
- export interface IBaggageInfo {
98
- baggagePieces?: number;
99
- baggageWeight?: number;
100
- }
101
-
102
- export interface ITariffInfo {
103
- farePrice: number;
104
- boardingFee: number;
105
- serviceFee: number;
106
- duFee: number;
107
- totalPrice: number;
108
- currency: string;
109
- }
110
-
111
- export interface IChargeDetails {
112
- shownTariff: number;
113
- publicTariff: number;
114
- privateTariff: number;
115
- clientDiscount: number;
116
- }
@@ -1,201 +0,0 @@
1
- export interface IWcfOffer {
2
- outbound: IWcfBound;
3
- inbound: IWcfBound | null;
4
- supplier: string;
5
- itineraryId?: number;
6
- travelIdentification: any;
7
- price: number;
8
- priceDetails: IPriceDetails;
9
- flightIdentification: string;
10
- stopType: string;
11
- cabinClass: string;
12
- diffAirports: boolean;
13
- familyOffers?: any[];
14
- selectedItineraryId?: number;
15
- }
16
-
17
- export interface IWcfBound {
18
- segments: IWcfSegment[];
19
- supplier: string;
20
- type: string;
21
- departure: string;
22
- departureHour: string;
23
- departureTextDate: string;
24
- departureWeekDay: string;
25
- arrival: string;
26
- arrivalHour: string;
27
- arrivalTextDate: string;
28
- arrivalWeekDay: string;
29
- daysDiff: number;
30
- origin: IWcfStation;
31
- destination: IWcfStation;
32
- totalStops: number;
33
- carrier: IWcfCarrier;
34
- durationMinutes: number;
35
- cabinClass: string;
36
- family: string;
37
- baggage: boolean;
38
- baggagePieces: number;
39
- baggageWeight: number;
40
- stops: any[];
41
- durationHours: string;
42
- }
43
-
44
- export interface IWcfSegment {
45
- departureMoment: string;
46
- departure: string;
47
- departureHour: string;
48
- departureTextDate: string;
49
- departureWeekDay: string;
50
- arrivalMoment: string;
51
- arrival: string;
52
- arrivalHour: string;
53
- arrivalTextDate: string;
54
- arrivalWeekDay: string;
55
- daysDiff: number;
56
- durationMinutes: number;
57
- durationHours: string;
58
- origin: IWcfStation;
59
- destination: IWcfStation;
60
- carrier: IWcfCarrier;
61
- family: string;
62
- familyCode: string;
63
- cabinClass: string;
64
- flightNumber: string;
65
- flightCode: string;
66
- baggage: boolean;
67
- baggagePieces: number;
68
- baggageWeight: number;
69
- fareInfo: IWcfFare;
70
- }
71
-
72
- interface IWcfStation {
73
- code: string;
74
- name: string;
75
- type: string;
76
- }
77
-
78
- interface IWcfCarrier {
79
- code: string;
80
- name: string;
81
- imageUrl: string;
82
- }
83
-
84
- export interface IWcfFare {
85
- base: string;
86
- class: string;
87
- flightNumber: string;
88
- }
89
-
90
- export interface IPriceDetails {
91
- total: number;
92
- totalPublic: number;
93
- totalFare: number;
94
- totalTaxes: number;
95
- totalAdditional: number;
96
- totalDiscount: number;
97
- totalPassengerFees?: number;
98
- totalDiscountMargin: number;
99
- }
100
-
101
- export interface IAirlinesOffer {
102
- supplierOfferDetails: IWcfOffer;
103
- [K: string]: any;
104
- }
105
-
106
- export interface IWcfReserveOfferReqDto {
107
- offer: IAirlinesOffer;
108
- reserveData: {
109
- contactInfo: IContactInfoReqDto;
110
- passengersInfo: IPassengerInfoReqDto[];
111
- };
112
- }
113
-
114
- export interface IContactInfoReqDto {
115
- firstName: string;
116
- surname: string;
117
- email: string;
118
- phone: {
119
- ddi: string;
120
- number: string;
121
- };
122
- companyName: string;
123
- address: {
124
- street: string;
125
- number: string;
126
- complement: string;
127
- postalCode: string;
128
- city: string;
129
- stateCode: string;
130
- countryCode: string;
131
- };
132
- }
133
-
134
- export interface IPassengerInfoReqDto {
135
- firstName: string;
136
- surname: string;
137
- birthDate: Date | string;
138
- sex: "M" | "F";
139
- nationality: string;
140
- residenceCountry: string;
141
- cpf: {
142
- number: string;
143
- };
144
- passport: {
145
- number: string;
146
- issuingCountry: string;
147
- expirationDate: Date | string;
148
- };
149
- }
150
-
151
- export interface IWcfReserveOfferResDto {
152
- status?: string;
153
- recordLocator?: string;
154
- price?: number;
155
- priceDetails?: IPriceDetails;
156
- reservedUntil?: Date | string;
157
- extraLocators?: string;
158
- error?: boolean;
159
- type?: string;
160
- message?: string;
161
- }
162
-
163
- export interface IWcfCheckReserveReqDto {
164
- offer: IAirlinesOffer;
165
- }
166
-
167
- export interface IWcfCheckReserveResDto {
168
- availability: boolean;
169
- reservedUntil?: Date;
170
- currentPrice: number;
171
- selectedPrice: number;
172
- priceDetails: IPriceDetails;
173
- isSamePrice: boolean;
174
- message: string;
175
- }
176
-
177
- export interface IWcfBuyOfferReqDto {
178
- offer: IWcfOffer;
179
- price: number;
180
- recordLocator: string;
181
- paymentDataHash: string;
182
- }
183
-
184
- export interface IWcfBuyOfferResDto {
185
- recordLocator: string;
186
- bookingCode: string;
187
- price: number;
188
- emittedAt: Date;
189
- error?: boolean;
190
- message?: string;
191
- }
192
-
193
- export interface IWcfCancelOfferReqDto {
194
- offer: IWcfOffer;
195
- }
196
-
197
- export interface IWcfCancelOfferResDto {
198
- error: boolean;
199
- type?: string;
200
- message?: string;
201
- }