sm-types 1.11.13 → 1.11.14

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.
@@ -49,8 +49,6 @@ export interface ISelectFlightChangeOptionsReqDto {
49
49
  selected_changes: selected_changes[];
50
50
  }
51
51
  export interface IRequestFlightChangeReqDto {
52
- title: string;
53
- description: string;
54
52
  payment_info: {
55
53
  type: string;
56
54
  credit_card: {
@@ -1,6 +1,10 @@
1
1
  import { CabinClass, Nullable } from "../../common";
2
2
  import { IJourneyIdentificator, IListOffersResDto, IPriceDetails, ISmWcfBound, ISmWcfFamilyOffer, ISmWcfOffer } from "../../sm-airlines";
3
3
  import { ChangeFlightType } from "./requests";
4
+ type SessionInfo = {
5
+ id: string;
6
+ valid_until: Date;
7
+ };
4
8
  export type EnrichedGeneralData = IListOffersResDto['generalData'] & {
5
9
  searchResultCount: number;
6
10
  };
@@ -37,25 +41,17 @@ export type EnrichedJourneyOptions = {
37
41
  };
38
42
  export interface IListFlightJourneyOptionsResDto {
39
43
  journeys: EnrichedJourneyOptions[];
44
+ is_international: boolean;
40
45
  supplier: string;
41
- changeType: ChangeFlightType;
42
- session_info: {
43
- id: string;
44
- valid_until: Date;
45
- };
46
+ change_type: ChangeFlightType;
47
+ session_info: SessionInfo;
46
48
  }
47
49
  export interface ISelectFlightChangeOptionsResDto {
48
50
  success: boolean;
49
- session_info: {
50
- id: string;
51
- valid_until: Date;
52
- };
51
+ session_info: SessionInfo;
53
52
  }
54
53
  export type RecalculateFlightOfferData = {
55
- session_info: {
56
- id: string;
57
- valid_until: Date;
58
- };
54
+ session_info: SessionInfo;
59
55
  base_offer_token: string;
60
56
  journeys_changed: {
61
57
  old_journey_id: string;
@@ -148,9 +144,90 @@ export interface IRequestFlightChangeResDto {
148
144
  updated_at: Date;
149
145
  }
150
146
  export interface ICreateFlightChangeSessionResDto {
151
- session_info: {
152
- id: string;
153
- valid_until: Date;
147
+ success: boolean;
148
+ session_info: SessionInfo;
149
+ }
150
+ export type FlightJourneyForSummary = {
151
+ index: number;
152
+ fareFamily: string;
153
+ priceDetails: {
154
+ duFee: number;
155
+ tax: number;
156
+ farePrice: number;
157
+ total: number;
154
158
  };
159
+ departure: {
160
+ airportCode: string;
161
+ airportName: string;
162
+ city?: string;
163
+ date: string;
164
+ time: string;
165
+ };
166
+ arrival: {
167
+ airportCode: string;
168
+ airportName: string;
169
+ city?: string;
170
+ date: string;
171
+ time: string;
172
+ };
173
+ duration: string;
174
+ totalStops: number;
175
+ segments: {
176
+ index: number;
177
+ flightNumber: string;
178
+ cabinClass: string;
179
+ duration: string;
180
+ connection?: {
181
+ segmentIndex: number;
182
+ waitingTime: string;
183
+ isSameAirport: boolean;
184
+ };
185
+ baggage: {
186
+ carryOn?: {
187
+ included: boolean;
188
+ quantity: number;
189
+ weight: {
190
+ value: number;
191
+ unit: string;
192
+ };
193
+ };
194
+ checked?: {
195
+ included: boolean;
196
+ quantity: number;
197
+ weight: {
198
+ value: number;
199
+ unit: string;
200
+ };
201
+ };
202
+ };
203
+ carrier: {
204
+ code: string;
205
+ name: string;
206
+ imageUrl: string;
207
+ };
208
+ departure: {
209
+ airportCode: string;
210
+ airportName: string;
211
+ date: string;
212
+ time: string;
213
+ };
214
+ arrival: {
215
+ airportCode: string;
216
+ airportName: string;
217
+ date: string;
218
+ time: string;
219
+ };
220
+ }[];
221
+ };
222
+ export type JourneySummary = {
223
+ has_changed: boolean;
224
+ old_journey: FlightJourneyForSummary;
225
+ new_journey?: FlightJourneyForSummary;
226
+ };
227
+ export interface IGetFlightChangeSummaryResDto {
228
+ outbound: JourneySummary;
229
+ inbound?: JourneySummary;
230
+ automatic_recalculation: boolean;
231
+ session_info: SessionInfo;
155
232
  }
156
233
  export {};
@@ -78,6 +78,36 @@ export declare const APP_ERROR_CODES: {
78
78
  };
79
79
  };
80
80
  };
81
+ GET_FLIGHT_CHANGE_SUMMARY: {
82
+ USER_NOT_FOUND: {
83
+ usecase: string;
84
+ type: string;
85
+ messageLangMap: {
86
+ 'PT-BR': string;
87
+ };
88
+ };
89
+ USER_NOT_BELONG_TO_SESSION: {
90
+ usecase: string;
91
+ type: string;
92
+ messageLangMap: {
93
+ 'PT-BR': string;
94
+ };
95
+ };
96
+ SESSION_WITH_INCOMPLETE_DATA: {
97
+ usecase: string;
98
+ type: string;
99
+ messageLangMap: {
100
+ 'PT-BR': string;
101
+ };
102
+ };
103
+ OFFER_NOT_FOUND: {
104
+ usecase: string;
105
+ type: string;
106
+ messageLangMap: {
107
+ 'PT-BR': string;
108
+ };
109
+ };
110
+ };
81
111
  ORDER_TRAVEL: {
82
112
  INVALID_CARD: {
83
113
  usecase: string;
@@ -144,16 +174,16 @@ export declare const APP_ERROR_CODES: {
144
174
  'PT-BR': string;
145
175
  };
146
176
  };
147
- };
148
- RECALCULATE_FLIGHT_CHANGES: {
149
- USER_NOT_FOUND: {
177
+ SESSION_WITH_INCOMPLETE_DATA: {
150
178
  usecase: string;
151
179
  type: string;
152
180
  messageLangMap: {
153
181
  'PT-BR': string;
154
182
  };
155
183
  };
156
- TRAVEL_NOT_FOUND: {
184
+ };
185
+ RECALCULATE_FLIGHT_CHANGES: {
186
+ USER_NOT_FOUND: {
157
187
  usecase: string;
158
188
  type: string;
159
189
  messageLangMap: {
@@ -167,28 +197,7 @@ export declare const APP_ERROR_CODES: {
167
197
  'PT-BR': string;
168
198
  };
169
199
  };
170
- USER_NOT_BELONG_TO_CLIENT: {
171
- usecase: string;
172
- type: string;
173
- messageLangMap: {
174
- 'PT-BR': string;
175
- };
176
- };
177
- MODIFICATION_NOT_ALLOWED: {
178
- usecase: string;
179
- type: string;
180
- messageLangMap: {
181
- 'PT-BR': string;
182
- };
183
- };
184
- OFFER_IS_NOT_FLIGHT: {
185
- usecase: string;
186
- type: string;
187
- messageLangMap: {
188
- 'PT-BR': string;
189
- };
190
- };
191
- INVALID_ACTOR: {
200
+ USER_NOT_BELONG_TO_SESSION: {
192
201
  usecase: string;
193
202
  type: string;
194
203
  messageLangMap: {
@@ -211,13 +220,6 @@ export declare const APP_ERROR_CODES: {
211
220
  'PT-BR': string;
212
221
  };
213
222
  };
214
- CLIENT_NOT_FOUND: {
215
- usecase: string;
216
- type: string;
217
- messageLangMap: {
218
- 'PT-BR': string;
219
- };
220
- };
221
223
  TRAVEL_NOT_FOUND: {
222
224
  usecase: string;
223
225
  type: string;
@@ -232,14 +234,7 @@ export declare const APP_ERROR_CODES: {
232
234
  'PT-BR': string;
233
235
  };
234
236
  };
235
- USER_NOT_BELONG_TO_CLIENT: {
236
- usecase: string;
237
- type: string;
238
- messageLangMap: {
239
- 'PT-BR': string;
240
- };
241
- };
242
- INVALID_ACTOR: {
237
+ USER_NOT_BELONG_TO_SESSION: {
243
238
  usecase: string;
244
239
  type: string;
245
240
  messageLangMap: {
@@ -253,13 +248,6 @@ export declare const APP_ERROR_CODES: {
253
248
  'PT-BR': string;
254
249
  };
255
250
  };
256
- FAILED_RETRIEVE_JOURNEYS: {
257
- usecase: string;
258
- type: string;
259
- messageLangMap: {
260
- 'PT-BR': string;
261
- };
262
- };
263
251
  SUPPLIER_CONFIG_NOT_FOUND: {
264
252
  usecase: string;
265
253
  type: string;
@@ -267,13 +255,6 @@ export declare const APP_ERROR_CODES: {
267
255
  'PT-BR': string;
268
256
  };
269
257
  };
270
- SUPPLIER_NOT_INTEGRATED: {
271
- usecase: string;
272
- type: string;
273
- messageLangMap: {
274
- 'PT-BR': string;
275
- };
276
- };
277
258
  EXIST_OPEN_REQUESTS: {
278
259
  usecase: string;
279
260
  type: string;
@@ -8,8 +8,10 @@ var requestFlightChanges_1 = require("./use-cases/flightChange/requestFlightChan
8
8
  var selectFlightChangeOptions_1 = require("./use-cases/flightChange/selectFlightChangeOptions");
9
9
  var documents_1 = require("./use-cases/documents");
10
10
  var createFlightChangeSession_1 = require("./use-cases/flightChange/createFlightChangeSession");
11
+ var getFlightChangeSummary_1 = require("./use-cases/flightChange/getFlightChangeSummary");
11
12
  exports.APP_ERROR_CODES = {
12
13
  CREATE_FLIGHT_CHANGE_SESSION: createFlightChangeSession_1.CREATE_FLIGHT_CHANGE_SESSION,
14
+ GET_FLIGHT_CHANGE_SUMMARY: getFlightChangeSummary_1.GET_FLIGHT_CHANGE_SUMMARY,
13
15
  ORDER_TRAVEL: orderTravel_1.ORDER_TRAVEL,
14
16
  LIST_FLIGHT_JOURNEY_OPTIONS: listFlightJourneyOptions_1.LIST_FLIGHT_JOURNEY_OPTIONS,
15
17
  RECALCULATE_FLIGHT_CHANGES: recalculateFlightChanges_1.RECALCULATE_FLIGHT_CHANGES,
@@ -27,7 +27,7 @@ exports.CREATE_FLIGHT_CHANGE_SESSION = {
27
27
  usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
28
28
  type: 'OFFER_NOT_FOUND',
29
29
  messageLangMap: {
30
- 'PT-BR': 'A oferta original não encontrado.',
30
+ 'PT-BR': 'A oferta original não encontrada.',
31
31
  },
32
32
  },
33
33
  USER_NOT_BELONG_TO_CLIENT: {
@@ -0,0 +1,30 @@
1
+ export declare const GET_FLIGHT_CHANGE_SUMMARY: {
2
+ USER_NOT_FOUND: {
3
+ usecase: string;
4
+ type: string;
5
+ messageLangMap: {
6
+ 'PT-BR': string;
7
+ };
8
+ };
9
+ USER_NOT_BELONG_TO_SESSION: {
10
+ usecase: string;
11
+ type: string;
12
+ messageLangMap: {
13
+ 'PT-BR': string;
14
+ };
15
+ };
16
+ SESSION_WITH_INCOMPLETE_DATA: {
17
+ usecase: string;
18
+ type: string;
19
+ messageLangMap: {
20
+ 'PT-BR': string;
21
+ };
22
+ };
23
+ OFFER_NOT_FOUND: {
24
+ usecase: string;
25
+ type: string;
26
+ messageLangMap: {
27
+ 'PT-BR': string;
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_FLIGHT_CHANGE_SUMMARY = void 0;
4
+ exports.GET_FLIGHT_CHANGE_SUMMARY = {
5
+ USER_NOT_FOUND: {
6
+ usecase: 'GET_FLIGHT_CHANGE_SUMMARY',
7
+ type: 'USER_NOT_FOUND',
8
+ messageLangMap: {
9
+ 'PT-BR': 'Usuário não encontrado.',
10
+ },
11
+ },
12
+ USER_NOT_BELONG_TO_SESSION: {
13
+ usecase: 'GET_FLIGHT_CHANGE_SUMMARY',
14
+ type: 'USER_NOT_BELONG_TO_SESSION',
15
+ messageLangMap: {
16
+ 'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
17
+ },
18
+ },
19
+ SESSION_WITH_INCOMPLETE_DATA: {
20
+ usecase: 'GET_FLIGHT_CHANGE_SUMMARY',
21
+ type: 'SESSION_WITH_INCOMPLETE_DATA',
22
+ messageLangMap: {
23
+ 'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
24
+ },
25
+ },
26
+ OFFER_NOT_FOUND: {
27
+ usecase: 'GET_FLIGHT_CHANGE_SUMMARY',
28
+ type: 'OFFER_NOT_FOUND',
29
+ messageLangMap: {
30
+ 'PT-BR': 'A oferta original não encontrada.',
31
+ },
32
+ },
33
+ };
@@ -13,4 +13,11 @@ export declare const LIST_FLIGHT_JOURNEY_OPTIONS: {
13
13
  'PT-BR': string;
14
14
  };
15
15
  };
16
+ SESSION_WITH_INCOMPLETE_DATA: {
17
+ usecase: string;
18
+ type: string;
19
+ messageLangMap: {
20
+ 'PT-BR': string;
21
+ };
22
+ };
16
23
  };
@@ -15,5 +15,12 @@ exports.LIST_FLIGHT_JOURNEY_OPTIONS = {
15
15
  messageLangMap: {
16
16
  'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
17
17
  },
18
- }
18
+ },
19
+ SESSION_WITH_INCOMPLETE_DATA: {
20
+ usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
21
+ type: 'SESSION_WITH_INCOMPLETE_DATA',
22
+ messageLangMap: {
23
+ 'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
24
+ },
25
+ },
19
26
  };
@@ -6,13 +6,6 @@ export declare const RECALCULATE_FLIGHT_CHANGES: {
6
6
  'PT-BR': string;
7
7
  };
8
8
  };
9
- TRAVEL_NOT_FOUND: {
10
- usecase: string;
11
- type: string;
12
- messageLangMap: {
13
- 'PT-BR': string;
14
- };
15
- };
16
9
  OFFER_NOT_FOUND: {
17
10
  usecase: string;
18
11
  type: string;
@@ -20,28 +13,7 @@ export declare const RECALCULATE_FLIGHT_CHANGES: {
20
13
  'PT-BR': string;
21
14
  };
22
15
  };
23
- USER_NOT_BELONG_TO_CLIENT: {
24
- usecase: string;
25
- type: string;
26
- messageLangMap: {
27
- 'PT-BR': string;
28
- };
29
- };
30
- MODIFICATION_NOT_ALLOWED: {
31
- usecase: string;
32
- type: string;
33
- messageLangMap: {
34
- 'PT-BR': string;
35
- };
36
- };
37
- OFFER_IS_NOT_FLIGHT: {
38
- usecase: string;
39
- type: string;
40
- messageLangMap: {
41
- 'PT-BR': string;
42
- };
43
- };
44
- INVALID_ACTOR: {
16
+ USER_NOT_BELONG_TO_SESSION: {
45
17
  usecase: string;
46
18
  type: string;
47
19
  messageLangMap: {
@@ -9,46 +9,18 @@ exports.RECALCULATE_FLIGHT_CHANGES = {
9
9
  'PT-BR': 'Usuário não encontrado.',
10
10
  },
11
11
  },
12
- TRAVEL_NOT_FOUND: {
13
- usecase: 'RECALCULATE_FLIGHT_CHANGES',
14
- type: 'TRAVEL_NOT_FOUND',
15
- messageLangMap: {
16
- 'PT-BR': 'Viagem não encontrado.',
17
- },
18
- },
19
12
  OFFER_NOT_FOUND: {
20
13
  usecase: 'RECALCULATE_FLIGHT_CHANGES',
21
14
  type: 'OFFER_NOT_FOUND',
22
15
  messageLangMap: {
23
- 'PT-BR': 'A oferta original não encontrado.',
24
- },
25
- },
26
- USER_NOT_BELONG_TO_CLIENT: {
27
- usecase: 'RECALCULATE_FLIGHT_CHANGES',
28
- type: 'USER_NOT_BELONG_TO_CLIENT',
29
- messageLangMap: {
30
- 'PT-BR': 'O usuário logado não pertence ao cliente da viagem.',
31
- },
32
- },
33
- MODIFICATION_NOT_ALLOWED: {
34
- usecase: 'RECALCULATE_FLIGHT_CHANGES',
35
- type: 'MODIFICATION_NOT_ALLOWED',
36
- messageLangMap: {
37
- 'PT-BR': 'A oferta não permite modificações',
38
- },
39
- },
40
- OFFER_IS_NOT_FLIGHT: {
41
- usecase: 'RECALCULATE_FLIGHT_CHANGES',
42
- type: 'OFFER_IS_NOT_FLIGHT',
43
- messageLangMap: {
44
- 'PT-BR': 'A oferta não é do tipo aéreo.',
16
+ 'PT-BR': 'A oferta original não encontrada.',
45
17
  },
46
18
  },
47
- INVALID_ACTOR: {
19
+ USER_NOT_BELONG_TO_SESSION: {
48
20
  usecase: 'RECALCULATE_FLIGHT_CHANGES',
49
- type: 'INVALID_ACTOR',
21
+ type: 'USER_NOT_BELONG_TO_SESSION',
50
22
  messageLangMap: {
51
- 'PT-BR': 'O solicitante deve ser o mesmo que iniciou o procedimento.',
23
+ 'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
52
24
  },
53
25
  },
54
26
  SESSION_WITH_INCOMPLETE_DATA: {
@@ -6,13 +6,6 @@ export declare const REQUEST_FLIGHT_CHANGE: {
6
6
  'PT-BR': string;
7
7
  };
8
8
  };
9
- CLIENT_NOT_FOUND: {
10
- usecase: string;
11
- type: string;
12
- messageLangMap: {
13
- 'PT-BR': string;
14
- };
15
- };
16
9
  TRAVEL_NOT_FOUND: {
17
10
  usecase: string;
18
11
  type: string;
@@ -27,14 +20,7 @@ export declare const REQUEST_FLIGHT_CHANGE: {
27
20
  'PT-BR': string;
28
21
  };
29
22
  };
30
- USER_NOT_BELONG_TO_CLIENT: {
31
- usecase: string;
32
- type: string;
33
- messageLangMap: {
34
- 'PT-BR': string;
35
- };
36
- };
37
- INVALID_ACTOR: {
23
+ USER_NOT_BELONG_TO_SESSION: {
38
24
  usecase: string;
39
25
  type: string;
40
26
  messageLangMap: {
@@ -48,13 +34,6 @@ export declare const REQUEST_FLIGHT_CHANGE: {
48
34
  'PT-BR': string;
49
35
  };
50
36
  };
51
- FAILED_RETRIEVE_JOURNEYS: {
52
- usecase: string;
53
- type: string;
54
- messageLangMap: {
55
- 'PT-BR': string;
56
- };
57
- };
58
37
  SUPPLIER_CONFIG_NOT_FOUND: {
59
38
  usecase: string;
60
39
  type: string;
@@ -62,13 +41,6 @@ export declare const REQUEST_FLIGHT_CHANGE: {
62
41
  'PT-BR': string;
63
42
  };
64
43
  };
65
- SUPPLIER_NOT_INTEGRATED: {
66
- usecase: string;
67
- type: string;
68
- messageLangMap: {
69
- 'PT-BR': string;
70
- };
71
- };
72
44
  EXIST_OPEN_REQUESTS: {
73
45
  usecase: string;
74
46
  type: string;
@@ -9,13 +9,6 @@ exports.REQUEST_FLIGHT_CHANGE = {
9
9
  'PT-BR': 'Usuário não encontrado.',
10
10
  },
11
11
  },
12
- CLIENT_NOT_FOUND: {
13
- usecase: 'REQUEST_FLIGHT_CHANGE',
14
- type: 'CLIENT_NOT_FOUND',
15
- messageLangMap: {
16
- 'PT-BR': 'Cliente não encontrado.',
17
- },
18
- },
19
12
  TRAVEL_NOT_FOUND: {
20
13
  usecase: 'REQUEST_FLIGHT_CHANGE',
21
14
  type: 'TRAVEL_NOT_FOUND',
@@ -30,18 +23,11 @@ exports.REQUEST_FLIGHT_CHANGE = {
30
23
  'PT-BR': 'A oferta original não encontrada.',
31
24
  },
32
25
  },
33
- USER_NOT_BELONG_TO_CLIENT: {
26
+ USER_NOT_BELONG_TO_SESSION: {
34
27
  usecase: 'REQUEST_FLIGHT_CHANGE',
35
- type: 'USER_NOT_BELONG_TO_CLIENT',
28
+ type: 'USER_NOT_BELONG_TO_SESSION',
36
29
  messageLangMap: {
37
- 'PT-BR': 'O usuário logado não pertence ao cliente da viagem.',
38
- },
39
- },
40
- INVALID_ACTOR: {
41
- usecase: 'REQUEST_FLIGHT_CHANGE',
42
- type: 'INVALID_ACTOR',
43
- messageLangMap: {
44
- 'PT-BR': 'O usuário logado não é válido para solicitar as mudanças.',
30
+ 'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
45
31
  },
46
32
  },
47
33
  SESSION_WITH_INCOMPLETE_DATA: {
@@ -51,29 +37,15 @@ exports.REQUEST_FLIGHT_CHANGE = {
51
37
  'PT-BR': 'Sessão com dados incompletos.',
52
38
  },
53
39
  },
54
- FAILED_RETRIEVE_JOURNEYS: {
55
- usecase: 'REQUEST_FLIGHT_CHANGE',
56
- type: 'FAILED_RETRIEVE_JOURNEYS',
57
- messageLangMap: {
58
- 'PT-BR': 'Falha ao recuperar as opções selecionadas.',
59
- },
60
- },
61
40
  SUPPLIER_CONFIG_NOT_FOUND: {
62
- usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
41
+ usecase: 'REQUEST_FLIGHT_CHANGE',
63
42
  type: 'SUPPLIER_CONFIG_NOT_FOUND',
64
43
  messageLangMap: {
65
44
  'PT-BR': 'Configuração do fornecedor não encontrada.',
66
45
  },
67
46
  },
68
- SUPPLIER_NOT_INTEGRATED: {
69
- usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
70
- type: 'SUPPLIER_NOT_INTEGRATED',
71
- messageLangMap: {
72
- 'PT-BR': 'O forncedor não integrado.',
73
- },
74
- },
75
47
  EXIST_OPEN_REQUESTS: {
76
- usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
48
+ usecase: 'REQUEST_FLIGHT_CHANGE',
77
49
  type: 'EXIST_OPEN_REQUESTS',
78
50
  messageLangMap: {
79
51
  'PT-BR': 'Há uma solicitação pendente para esta oferta.',
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.11.13",
6
+ "version": "1.11.14",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",