sm-types 1.11.45 → 1.11.48

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.
@@ -1,4 +1,4 @@
1
- import { CabinClass } from "../../common";
1
+ import { CabinClass, ChangeFlightType, SectionToBeReplaced } from "../../common";
2
2
  export type JourneyRequestDto = {
3
3
  origin: {
4
4
  name: string;
@@ -17,20 +17,11 @@ export type JourneyRequestDto = {
17
17
  date: string;
18
18
  cabin_class: CabinClass;
19
19
  };
20
- export declare enum ChangeFlightType {
21
- ONE_WAY = "ONE_WAY",
22
- ROUND_TRIP = "ROUND_TRIP",
23
- RETURN = "RETURN"
24
- }
25
20
  export interface ICreateFlightChangeSessionReqDto {
26
21
  change_type: ChangeFlightType;
27
22
  journeys_to_change: JourneyRequestDto[];
28
23
  }
29
- export declare enum SectionToBeReplaced {
30
- OUTBOUND = "OUTBOUND",
31
- INBOUND = "INBOUND"
32
- }
33
- export type selected_changes = {
24
+ export type SelectedChanges = {
34
25
  section_to_be_replaced: SectionToBeReplaced;
35
26
  fare: {
36
27
  id: string;
@@ -45,7 +36,7 @@ export type selected_changes = {
45
36
  search_id: string;
46
37
  };
47
38
  export interface ISelectFlightChangeOptionsReqDto {
48
- selected_changes: selected_changes[];
39
+ selected_changes: SelectedChanges[];
49
40
  }
50
41
  export interface IRequestFlightChangeReqDto {
51
42
  payment_info: {
@@ -1,17 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SectionToBeReplaced = exports.ChangeFlightType = void 0;
4
- var ChangeFlightType;
5
- (function (ChangeFlightType) {
6
- ChangeFlightType["ONE_WAY"] = "ONE_WAY";
7
- ChangeFlightType["ROUND_TRIP"] = "ROUND_TRIP";
8
- ChangeFlightType["RETURN"] = "RETURN";
9
- })(ChangeFlightType = exports.ChangeFlightType || (exports.ChangeFlightType = {}));
10
3
  ;
11
- //********************************** selectFlightChangeOptionsAction **********************************/
12
- var SectionToBeReplaced;
13
- (function (SectionToBeReplaced) {
14
- SectionToBeReplaced["OUTBOUND"] = "OUTBOUND";
15
- SectionToBeReplaced["INBOUND"] = "INBOUND";
16
- })(SectionToBeReplaced = exports.SectionToBeReplaced || (exports.SectionToBeReplaced = {}));
17
4
  ;
@@ -1,6 +1,5 @@
1
- import { CabinClass, Nullable } from "../../common";
1
+ import { CabinClass, ChangeFlightType, FlightChangeProcessingStatus, Nullable } from "../../common";
2
2
  import { IJourneyIdentificator, IListOffersResDto, IPriceDetails, ISmWcfBound, ISmWcfFamilyOffer, ISmWcfOffer } from "../../sm-airlines";
3
- import { ChangeFlightType } from "./requests";
4
3
  type SessionInfo = {
5
4
  id: string;
6
5
  valid_until: Date;
@@ -51,14 +50,48 @@ export interface ISelectFlightChangeOptionsResDto {
51
50
  success: boolean;
52
51
  session_info: SessionInfo;
53
52
  }
54
- export type RecalculateFlightOfferData = {
55
- session_info: SessionInfo;
56
- payment_details: {
57
- currency_code: string;
58
- amount_to_pay: number;
53
+ export type PaymentDetails = {
54
+ currency_code: string;
55
+ before_changes: {
59
56
  amount: number;
57
+ balance_due: number;
58
+ fare_amount: number;
59
+ tax_amount: number;
60
+ fees: {
61
+ refund_fee_amount: number;
62
+ change_fee_amount: number;
63
+ organization_fee_amount: number;
64
+ service_fee_amount: number;
65
+ };
66
+ };
67
+ after_changes: {
68
+ amount: number;
69
+ balance_due: {
70
+ credit_shell_amount: number;
71
+ refund_amount: number;
72
+ to_pay_amount: number;
73
+ };
74
+ fare_amount: number;
75
+ tax_amount: number;
76
+ fees: {
77
+ refund_fee_amount: number;
78
+ change_fee_amount: number;
79
+ organization_fee_amount: number;
80
+ service_fee_amount: number;
81
+ };
82
+ refundable_payments: {
83
+ key: string;
84
+ method_code: string;
85
+ account_number: string;
86
+ amount: number;
87
+ refundable_amount: number;
88
+ }[];
60
89
  };
61
90
  };
91
+ export type RecalculateFlightOfferData = {
92
+ session_info: SessionInfo;
93
+ payment_details: PaymentDetails;
94
+ };
62
95
  export type FlightChangeInfoJson = {
63
96
  supplier: string;
64
97
  newJourneys: ISmWcfOffer[];
@@ -120,22 +153,11 @@ export type FlightChangeInfoJson = {
120
153
  export interface IRequestFlightChangeResDto {
121
154
  token: string;
122
155
  offer_token: string;
123
- service_type: string;
124
- category: string;
125
- description: string;
126
- requested_by: string;
127
- request_info_json: FlightChangeInfoJson;
128
- supplier_config_json: any;
129
- payment_json: any;
130
- title: string;
131
- failure_reason: string;
132
- failure_description: string;
133
- status: string;
134
- process_type: string;
156
+ change_type: ChangeFlightType;
157
+ processing_status: FlightChangeProcessingStatus;
135
158
  forecasted_price: number;
136
- price: number;
159
+ requested_by: string;
137
160
  created_at: Date;
138
- updated_at: Date;
139
161
  }
140
162
  export interface ICreateFlightChangeSessionResDto {
141
163
  success: boolean;
package/common/enums.d.ts CHANGED
@@ -126,3 +126,18 @@ export declare enum TripLink {
126
126
  CONNECTION = "connection",
127
127
  DIRECT = "direct"
128
128
  }
129
+ export declare enum FlightChangeProcessingStatus {
130
+ UNITIATED = "UNITIATED",
131
+ PENDING = "PENDING",
132
+ SUCCESS = "SUCCESS",
133
+ FAILED = "FAILED"
134
+ }
135
+ export declare enum ChangeFlightType {
136
+ ONE_WAY = "ONE_WAY",
137
+ ROUND_TRIP = "ROUND_TRIP",
138
+ RETURN = "RETURN"
139
+ }
140
+ export declare enum SectionToBeReplaced {
141
+ OUTBOUND = "OUTBOUND",
142
+ INBOUND = "INBOUND"
143
+ }
package/common/enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TripLink = 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.SectionToBeReplaced = exports.ChangeFlightType = exports.FlightChangeProcessingStatus = exports.TripLink = 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";
@@ -121,3 +121,21 @@ var TripLink;
121
121
  TripLink["CONNECTION"] = "connection";
122
122
  TripLink["DIRECT"] = "direct";
123
123
  })(TripLink = exports.TripLink || (exports.TripLink = {}));
124
+ var FlightChangeProcessingStatus;
125
+ (function (FlightChangeProcessingStatus) {
126
+ FlightChangeProcessingStatus["UNITIATED"] = "UNITIATED";
127
+ FlightChangeProcessingStatus["PENDING"] = "PENDING";
128
+ FlightChangeProcessingStatus["SUCCESS"] = "SUCCESS";
129
+ FlightChangeProcessingStatus["FAILED"] = "FAILED";
130
+ })(FlightChangeProcessingStatus = exports.FlightChangeProcessingStatus || (exports.FlightChangeProcessingStatus = {}));
131
+ var ChangeFlightType;
132
+ (function (ChangeFlightType) {
133
+ ChangeFlightType["ONE_WAY"] = "ONE_WAY";
134
+ ChangeFlightType["ROUND_TRIP"] = "ROUND_TRIP";
135
+ ChangeFlightType["RETURN"] = "RETURN";
136
+ })(ChangeFlightType = exports.ChangeFlightType || (exports.ChangeFlightType = {}));
137
+ var SectionToBeReplaced;
138
+ (function (SectionToBeReplaced) {
139
+ SectionToBeReplaced["OUTBOUND"] = "OUTBOUND";
140
+ SectionToBeReplaced["INBOUND"] = "INBOUND";
141
+ })(SectionToBeReplaced = exports.SectionToBeReplaced || (exports.SectionToBeReplaced = {}));
@@ -101,7 +101,7 @@ export declare const APP_ERROR_CODES: {
101
101
  usecase: string;
102
102
  };
103
103
  };
104
- CREATE_FLIGHT_CHANGE_SESSION: {
104
+ CREATE_FLIGHT_CHANGE: {
105
105
  USER_NOT_FOUND: {
106
106
  usecase: string;
107
107
  type: string;
@@ -151,7 +151,7 @@ export declare const APP_ERROR_CODES: {
151
151
  'PT-BR': string;
152
152
  };
153
153
  };
154
- SUPPLIER_NOT_INTEGRATED: {
154
+ SUPPLIER_UNSUPPORTED_CHANGE: {
155
155
  usecase: string;
156
156
  type: string;
157
157
  messageLangMap: {
@@ -407,14 +407,14 @@ export declare const APP_ERROR_CODES: {
407
407
  'PT-BR': string;
408
408
  };
409
409
  };
410
- USER_NOT_BELONG_TO_SESSION: {
410
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
411
411
  usecase: string;
412
412
  type: string;
413
413
  messageLangMap: {
414
414
  'PT-BR': string;
415
415
  };
416
416
  };
417
- SESSION_WITH_INCOMPLETE_DATA: {
417
+ FLIGHT_CHANGE_NOT_FOUND: {
418
418
  usecase: string;
419
419
  type: string;
420
420
  messageLangMap: {
@@ -520,14 +520,35 @@ export declare const APP_ERROR_CODES: {
520
520
  'PT-BR': string;
521
521
  };
522
522
  };
523
- USER_NOT_BELONG_TO_SESSION: {
523
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
524
524
  usecase: string;
525
525
  type: string;
526
526
  messageLangMap: {
527
527
  'PT-BR': string;
528
528
  };
529
529
  };
530
- SESSION_WITH_INCOMPLETE_DATA: {
530
+ FLIGHT_CHANGE_NOT_FOUND: {
531
+ usecase: string;
532
+ type: string;
533
+ messageLangMap: {
534
+ 'PT-BR': string;
535
+ };
536
+ };
537
+ OFFER_NOT_FLIGHT: {
538
+ usecase: string;
539
+ type: string;
540
+ messageLangMap: {
541
+ 'PT-BR': string;
542
+ };
543
+ };
544
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
545
+ usecase: string;
546
+ type: string;
547
+ messageLangMap: {
548
+ 'PT-BR': string;
549
+ };
550
+ };
551
+ FLIGHT_CHANGE_UNSUPPORTED_RECALCULATION: {
531
552
  usecase: string;
532
553
  type: string;
533
554
  messageLangMap: {
@@ -557,14 +578,14 @@ export declare const APP_ERROR_CODES: {
557
578
  'PT-BR': string;
558
579
  };
559
580
  };
560
- USER_NOT_BELONG_TO_SESSION: {
581
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
561
582
  usecase: string;
562
583
  type: string;
563
584
  messageLangMap: {
564
585
  'PT-BR': string;
565
586
  };
566
587
  };
567
- SESSION_WITH_INCOMPLETE_DATA: {
588
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
568
589
  usecase: string;
569
590
  type: string;
570
591
  messageLangMap: {
@@ -585,6 +606,20 @@ export declare const APP_ERROR_CODES: {
585
606
  'PT-BR': string;
586
607
  };
587
608
  };
609
+ FLIGHT_CHANGE_NOT_FOUND: {
610
+ usecase: string;
611
+ type: string;
612
+ messageLangMap: {
613
+ 'PT-BR': string;
614
+ };
615
+ };
616
+ INVALID_PAYMENT_TYPE: {
617
+ usecase: string;
618
+ type: string;
619
+ messageLangMap: {
620
+ 'PT-BR': string;
621
+ };
622
+ };
588
623
  };
589
624
  SELECT_FLIGHT_CHANGE_OPTIONS: {
590
625
  USER_NOT_FOUND: {
@@ -601,14 +636,28 @@ export declare const APP_ERROR_CODES: {
601
636
  'PT-BR': string;
602
637
  };
603
638
  };
604
- USER_NOT_BELONG_TO_SESSION: {
639
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
605
640
  usecase: string;
606
641
  type: string;
607
642
  messageLangMap: {
608
643
  'PT-BR': string;
609
644
  };
610
645
  };
611
- SESSION_WITH_INCOMPLETE_DATA: {
646
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
647
+ usecase: string;
648
+ type: string;
649
+ messageLangMap: {
650
+ 'PT-BR': string;
651
+ };
652
+ };
653
+ FLIGHT_CHANGE_NOT_FOUND: {
654
+ usecase: string;
655
+ type: string;
656
+ messageLangMap: {
657
+ 'PT-BR': string;
658
+ };
659
+ };
660
+ OFFER_NOT_FLIGHT: {
612
661
  usecase: string;
613
662
  type: string;
614
663
  messageLangMap: {
@@ -4,7 +4,7 @@ exports.APP_ERROR_CODES = void 0;
4
4
  var activateApproverReplacement_1 = require("./use-cases/approval/approver-replacement/activateApproverReplacement");
5
5
  var createApproverReplacement_1 = require("./use-cases/approval/approver-replacement/createApproverReplacement");
6
6
  var createCountryRestriction_1 = require("./use-cases/countryRestrictions/createCountryRestriction");
7
- var createFlightChangeSession_1 = require("./use-cases/flightChange/createFlightChangeSession");
7
+ var createFlightChange_1 = require("./use-cases/flightChange/createFlightChange");
8
8
  var deactivateApproverReplacement_1 = require("./use-cases/approval/approver-replacement/deactivateApproverReplacement");
9
9
  var documents_1 = require("./use-cases/documents");
10
10
  var getApproverReplacement_1 = require("./use-cases/approval/approver-replacement/getApproverReplacement");
@@ -25,7 +25,7 @@ exports.APP_ERROR_CODES = {
25
25
  ACTIVATE_APPROVER_REPLACEMENT: activateApproverReplacement_1.ACTIVATE_APPROVER_REPLACEMENT,
26
26
  CREATE_APPROVER_REPLACEMENT: createApproverReplacement_1.CREATE_APPROVER_REPLACEMENT,
27
27
  CREATE_COUNTRY_RESTRICTION: createCountryRestriction_1.CREATE_COUNTRY_RESTRICTION,
28
- CREATE_FLIGHT_CHANGE_SESSION: createFlightChangeSession_1.CREATE_FLIGHT_CHANGE_SESSION,
28
+ CREATE_FLIGHT_CHANGE: createFlightChange_1.CREATE_FLIGHT_CHANGE,
29
29
  DEACTIVATE_APPROVER_REPLACEMENT: deactivateApproverReplacement_1.DEACTIVATE_APPROVER_REPLACEMENT,
30
30
  DOCUMENTS: documents_1.DOCUMENTS,
31
31
  GET_APPROVER_REPLACEMENT: getApproverReplacement_1.GET_APPROVER_REPLACEMENT,
@@ -1,4 +1,4 @@
1
- export declare const CREATE_FLIGHT_CHANGE_SESSION: {
1
+ export declare const CREATE_FLIGHT_CHANGE: {
2
2
  USER_NOT_FOUND: {
3
3
  usecase: string;
4
4
  type: string;
@@ -48,7 +48,7 @@ export declare const CREATE_FLIGHT_CHANGE_SESSION: {
48
48
  'PT-BR': string;
49
49
  };
50
50
  };
51
- SUPPLIER_NOT_INTEGRATED: {
51
+ SUPPLIER_UNSUPPORTED_CHANGE: {
52
52
  usecase: string;
53
53
  type: string;
54
54
  messageLangMap: {
@@ -1,79 +1,79 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_FLIGHT_CHANGE_SESSION = void 0;
4
- exports.CREATE_FLIGHT_CHANGE_SESSION = {
3
+ exports.CREATE_FLIGHT_CHANGE = void 0;
4
+ exports.CREATE_FLIGHT_CHANGE = {
5
5
  USER_NOT_FOUND: {
6
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
6
+ usecase: 'CREATE_FLIGHT_CHANGE',
7
7
  type: 'USER_NOT_FOUND',
8
8
  messageLangMap: {
9
9
  'PT-BR': 'Usuário não encontrado.',
10
10
  },
11
11
  },
12
12
  CLIENT_NOT_FOUND: {
13
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
13
+ usecase: 'CREATE_FLIGHT_CHANGE',
14
14
  type: 'CLIENT_NOT_FOUND',
15
15
  messageLangMap: {
16
16
  'PT-BR': 'Cliente não encontrado.',
17
17
  },
18
18
  },
19
19
  TRAVEL_NOT_FOUND: {
20
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
20
+ usecase: 'CREATE_FLIGHT_CHANGE',
21
21
  type: 'TRAVEL_NOT_FOUND',
22
22
  messageLangMap: {
23
23
  'PT-BR': 'Viagem não encontrado.',
24
24
  },
25
25
  },
26
26
  OFFER_NOT_FOUND: {
27
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
27
+ usecase: 'CREATE_FLIGHT_CHANGE',
28
28
  type: 'OFFER_NOT_FOUND',
29
29
  messageLangMap: {
30
30
  'PT-BR': 'A oferta original não encontrada.',
31
31
  },
32
32
  },
33
33
  USER_NOT_BELONG_TO_CLIENT: {
34
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
34
+ usecase: 'CREATE_FLIGHT_CHANGE',
35
35
  type: 'USER_NOT_BELONG_TO_CLIENT',
36
36
  messageLangMap: {
37
- 'PT-BR': 'O usuário logado não pertence ao cliente da viagem.',
37
+ 'PT-BR': 'O usuário logado não é válido.',
38
38
  },
39
39
  },
40
40
  CABIN_CLASS_NOT_ALLOWED: {
41
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
41
+ usecase: 'CREATE_FLIGHT_CHANGE',
42
42
  type: 'CABIN_CLASS_NOT_ALLOWED',
43
43
  messageLangMap: {
44
44
  'PT-BR': 'Opção de cabine não permitida.',
45
45
  },
46
46
  },
47
47
  OFFER_IS_NOT_FLIGHT: {
48
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
48
+ usecase: 'CREATE_FLIGHT_CHANGE',
49
49
  type: 'OFFER_IS_NOT_FLIGHT',
50
50
  messageLangMap: {
51
51
  'PT-BR': 'A oferta não é do tipo aéreo.',
52
52
  },
53
53
  },
54
- SUPPLIER_NOT_INTEGRATED: {
55
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
56
- type: 'SUPPLIER_NOT_INTEGRATED',
54
+ SUPPLIER_UNSUPPORTED_CHANGE: {
55
+ usecase: 'CREATE_FLIGHT_CHANGE',
56
+ type: 'SUPPLIER_UNSUPPORTED_CHANGE',
57
57
  messageLangMap: {
58
- 'PT-BR': 'O forncedor não integrado.',
58
+ 'PT-BR': 'O fornecedor não suporta alterações nas ofertas.',
59
59
  },
60
60
  },
61
61
  SUPPLIER_CONFIG_NOT_FOUND: {
62
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
62
+ usecase: 'CREATE_FLIGHT_CHANGE',
63
63
  type: 'SUPPLIER_CONFIG_NOT_FOUND',
64
64
  messageLangMap: {
65
65
  'PT-BR': 'Configuração do fornecedor não encontrada.',
66
66
  },
67
67
  },
68
68
  EXIST_OPEN_REQUESTS: {
69
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
69
+ usecase: 'CREATE_FLIGHT_CHANGE',
70
70
  type: 'EXIST_OPEN_REQUESTS',
71
71
  messageLangMap: {
72
- 'PT-BR': ' uma solicitação pendente para esta oferta.',
72
+ 'PT-BR': 'Apenas uma solicitação é permitida por oferta.',
73
73
  },
74
74
  },
75
75
  OFFER_IS_NOT_EMITTED: {
76
- usecase: 'CREATE_FLIGHT_CHANGE_SESSION',
76
+ usecase: 'CREATE_FLIGHT_CHANGE',
77
77
  type: 'OFFER_IS_NOT_EMITTED',
78
78
  messageLangMap: {
79
79
  'PT-BR': 'Não é possível solicitar modificações em ofertas não emitidas.',
@@ -6,14 +6,14 @@ export declare const LIST_FLIGHT_JOURNEY_OPTIONS: {
6
6
  'PT-BR': string;
7
7
  };
8
8
  };
9
- USER_NOT_BELONG_TO_SESSION: {
9
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
10
10
  usecase: string;
11
11
  type: string;
12
12
  messageLangMap: {
13
13
  'PT-BR': string;
14
14
  };
15
15
  };
16
- SESSION_WITH_INCOMPLETE_DATA: {
16
+ FLIGHT_CHANGE_NOT_FOUND: {
17
17
  usecase: string;
18
18
  type: string;
19
19
  messageLangMap: {
@@ -9,18 +9,18 @@ exports.LIST_FLIGHT_JOURNEY_OPTIONS = {
9
9
  'PT-BR': 'Usuário não encontrado.',
10
10
  },
11
11
  },
12
- USER_NOT_BELONG_TO_SESSION: {
12
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
13
13
  usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
14
- type: 'USER_NOT_BELONG_TO_SESSION',
14
+ type: 'USER_NOT_BELONG_TO_FLIGHT_CHANGE',
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: {
19
+ FLIGHT_CHANGE_NOT_FOUND: {
20
20
  usecase: 'LIST_FLIGHT_JOURNEY_OPTIONS',
21
- type: 'SESSION_WITH_INCOMPLETE_DATA',
21
+ type: 'FLIGHT_CHANGE_NOT_FOUND',
22
22
  messageLangMap: {
23
- 'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
23
+ 'PT-BR': 'A alteração de voo não foi encontrada.',
24
24
  },
25
25
  },
26
26
  INCOMPLETE_RESULT: {
@@ -13,14 +13,35 @@ export declare const RECALCULATE_FLIGHT_CHANGES: {
13
13
  'PT-BR': string;
14
14
  };
15
15
  };
16
- USER_NOT_BELONG_TO_SESSION: {
16
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
17
17
  usecase: string;
18
18
  type: string;
19
19
  messageLangMap: {
20
20
  'PT-BR': string;
21
21
  };
22
22
  };
23
- SESSION_WITH_INCOMPLETE_DATA: {
23
+ FLIGHT_CHANGE_NOT_FOUND: {
24
+ usecase: string;
25
+ type: string;
26
+ messageLangMap: {
27
+ 'PT-BR': string;
28
+ };
29
+ };
30
+ OFFER_NOT_FLIGHT: {
31
+ usecase: string;
32
+ type: string;
33
+ messageLangMap: {
34
+ 'PT-BR': string;
35
+ };
36
+ };
37
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
38
+ usecase: string;
39
+ type: string;
40
+ messageLangMap: {
41
+ 'PT-BR': string;
42
+ };
43
+ };
44
+ FLIGHT_CHANGE_UNSUPPORTED_RECALCULATION: {
24
45
  usecase: string;
25
46
  type: string;
26
47
  messageLangMap: {
@@ -16,18 +16,39 @@ exports.RECALCULATE_FLIGHT_CHANGES = {
16
16
  'PT-BR': 'A oferta original não encontrada.',
17
17
  },
18
18
  },
19
- USER_NOT_BELONG_TO_SESSION: {
19
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
20
20
  usecase: 'RECALCULATE_FLIGHT_CHANGES',
21
- type: 'USER_NOT_BELONG_TO_SESSION',
21
+ type: 'USER_NOT_BELONG_TO_FLIGHT_CHANGE',
22
22
  messageLangMap: {
23
23
  'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
24
24
  },
25
25
  },
26
- SESSION_WITH_INCOMPLETE_DATA: {
26
+ FLIGHT_CHANGE_NOT_FOUND: {
27
27
  usecase: 'RECALCULATE_FLIGHT_CHANGES',
28
- type: 'SESSION_WITH_INCOMPLETE_DATA',
28
+ type: 'FLIGHT_CHANGE_NOT_FOUND',
29
+ messageLangMap: {
30
+ 'PT-BR': 'A alteração de voo não foi encontrada.',
31
+ },
32
+ },
33
+ OFFER_NOT_FLIGHT: {
34
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
35
+ type: 'OFFER_NOT_FLIGHT',
36
+ messageLangMap: {
37
+ 'PT-BR': 'A oferta não é do tipo aéreo.',
38
+ },
39
+ },
40
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
41
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
42
+ type: 'FLIGHT_CHANGE_INCOMPLETE_DATA',
29
43
  messageLangMap: {
30
44
  'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
31
45
  },
32
46
  },
47
+ FLIGHT_CHANGE_UNSUPPORTED_RECALCULATION: {
48
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
49
+ type: 'FLIGHT_CHANGE_UNSUPPORTED_RECALCULATION',
50
+ messageLangMap: {
51
+ 'PT-BR': 'A alteração de voo não suporta recalculo.',
52
+ },
53
+ },
33
54
  };
@@ -20,14 +20,14 @@ export declare const REQUEST_FLIGHT_CHANGE: {
20
20
  'PT-BR': string;
21
21
  };
22
22
  };
23
- USER_NOT_BELONG_TO_SESSION: {
23
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
24
24
  usecase: string;
25
25
  type: string;
26
26
  messageLangMap: {
27
27
  'PT-BR': string;
28
28
  };
29
29
  };
30
- SESSION_WITH_INCOMPLETE_DATA: {
30
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
31
31
  usecase: string;
32
32
  type: string;
33
33
  messageLangMap: {
@@ -48,4 +48,18 @@ export declare const REQUEST_FLIGHT_CHANGE: {
48
48
  'PT-BR': string;
49
49
  };
50
50
  };
51
+ FLIGHT_CHANGE_NOT_FOUND: {
52
+ usecase: string;
53
+ type: string;
54
+ messageLangMap: {
55
+ 'PT-BR': string;
56
+ };
57
+ };
58
+ INVALID_PAYMENT_TYPE: {
59
+ usecase: string;
60
+ type: string;
61
+ messageLangMap: {
62
+ 'PT-BR': string;
63
+ };
64
+ };
51
65
  };
@@ -23,18 +23,18 @@ exports.REQUEST_FLIGHT_CHANGE = {
23
23
  'PT-BR': 'A oferta original não encontrada.',
24
24
  },
25
25
  },
26
- USER_NOT_BELONG_TO_SESSION: {
26
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
27
27
  usecase: 'REQUEST_FLIGHT_CHANGE',
28
28
  type: 'USER_NOT_BELONG_TO_SESSION',
29
29
  messageLangMap: {
30
- 'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
30
+ 'PT-BR': 'O usuário logado não é válido.',
31
31
  },
32
32
  },
33
- SESSION_WITH_INCOMPLETE_DATA: {
33
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
34
34
  usecase: 'REQUEST_FLIGHT_CHANGE',
35
- type: 'SESSION_WITH_INCOMPLETE_DATA',
35
+ type: 'FLIGHT_CHANGE_INCOMPLETE_DATA',
36
36
  messageLangMap: {
37
- 'PT-BR': 'Sessão com dados incompletos.',
37
+ 'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
38
38
  },
39
39
  },
40
40
  SUPPLIER_CONFIG_NOT_FOUND: {
@@ -51,4 +51,18 @@ exports.REQUEST_FLIGHT_CHANGE = {
51
51
  'PT-BR': 'Há uma solicitação pendente para esta oferta.',
52
52
  },
53
53
  },
54
+ FLIGHT_CHANGE_NOT_FOUND: {
55
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
56
+ type: 'FLIGHT_CHANGE_NOT_FOUND',
57
+ messageLangMap: {
58
+ 'PT-BR': 'A alteração de voo não foi encontrada.',
59
+ },
60
+ },
61
+ INVALID_PAYMENT_TYPE: {
62
+ usecase: 'REQUEST_FLIGHT_CHANGE',
63
+ type: 'INVALID_PAYMENT_TYPE',
64
+ messageLangMap: {
65
+ 'PT-BR': 'O tipo de pagamento não é válido.',
66
+ },
67
+ },
54
68
  };
@@ -13,14 +13,28 @@ export declare const SELECT_FLIGHT_CHANGE_OPTIONS: {
13
13
  'PT-BR': string;
14
14
  };
15
15
  };
16
- USER_NOT_BELONG_TO_SESSION: {
16
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
17
17
  usecase: string;
18
18
  type: string;
19
19
  messageLangMap: {
20
20
  'PT-BR': string;
21
21
  };
22
22
  };
23
- SESSION_WITH_INCOMPLETE_DATA: {
23
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
24
+ usecase: string;
25
+ type: string;
26
+ messageLangMap: {
27
+ 'PT-BR': string;
28
+ };
29
+ };
30
+ FLIGHT_CHANGE_NOT_FOUND: {
31
+ usecase: string;
32
+ type: string;
33
+ messageLangMap: {
34
+ 'PT-BR': string;
35
+ };
36
+ };
37
+ OFFER_NOT_FLIGHT: {
24
38
  usecase: string;
25
39
  type: string;
26
40
  messageLangMap: {
@@ -16,18 +16,32 @@ exports.SELECT_FLIGHT_CHANGE_OPTIONS = {
16
16
  'PT-BR': 'A oferta original não encontrada.',
17
17
  },
18
18
  },
19
- USER_NOT_BELONG_TO_SESSION: {
20
- usecase: 'RECALCULATE_FLIGHT_CHANGES',
21
- type: 'USER_NOT_BELONG_TO_SESSION',
19
+ USER_NOT_BELONG_TO_FLIGHT_CHANGE: {
20
+ usecase: 'SELECT_FLIGHT_CHANGE_OPTIONS',
21
+ type: 'USER_NOT_BELONG_TO_FLIGHT_CHANGE',
22
22
  messageLangMap: {
23
- 'PT-BR': 'Não é possível trocar o usuário durante uma solicitação de alteração de voo.',
23
+ 'PT-BR': 'O usuário logado não é válido.',
24
24
  },
25
25
  },
26
- SESSION_WITH_INCOMPLETE_DATA: {
26
+ FLIGHT_CHANGE_INCOMPLETE_DATA: {
27
27
  usecase: 'SELECT_FLIGHT_CHANGE_OPTIONS',
28
- type: 'SESSION_WITH_INCOMPLETE_DATA',
28
+ type: 'FLIGHT_CHANGE_INCOMPLETE_DATA',
29
+ messageLangMap: {
30
+ 'PT-BR': 'As informações dos passos anteriores não foram preenchidas ou salvas.',
31
+ },
32
+ },
33
+ FLIGHT_CHANGE_NOT_FOUND: {
34
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
35
+ type: 'FLIGHT_CHANGE_NOT_FOUND',
36
+ messageLangMap: {
37
+ 'PT-BR': 'A alteração de voo não foi encontrada.',
38
+ },
39
+ },
40
+ OFFER_NOT_FLIGHT: {
41
+ usecase: 'RECALCULATE_FLIGHT_CHANGES',
42
+ type: 'OFFER_NOT_FLIGHT',
29
43
  messageLangMap: {
30
- 'PT-BR': 'Sessão com dados incompletos.',
44
+ 'PT-BR': 'A oferta não é do tipo aéreo.',
31
45
  },
32
46
  },
33
47
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.11.45",
6
+ "version": "1.11.48",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,4 +1,4 @@
1
- import { RentabilityTypeEnum, CredentialTypeEnum } from "../../common";
1
+ import { RentabilityTypeEnum, CredentialTypeEnum, ChangeFlightType } from "../../common";
2
2
  import { AmadeusCredentials } from "../../sm-amadeus";
3
3
  import { IAzulCredentials } from "../../sm-azul";
4
4
  import { IPaxInfo, IPassengerInfo, IContactInfo, IRoute, IOrderOptions, IWcfCredentials, ITTravelCredentialItem, IBoundFareDetails } from "../index";
@@ -72,17 +72,18 @@ export type SelectedFareToRecalculate = {
72
72
  fareBasis: string;
73
73
  itineraryId: string;
74
74
  };
75
- export type OptionToRecalculateDto = {
75
+ export type JourneyToChangeDto = {
76
76
  journeyIdToChange: string;
77
77
  supplierSearchId: string;
78
78
  newSelectedFare: SelectedFareToRecalculate;
79
79
  };
80
80
  export interface IRecalculateOfferChangesReqDto {
81
- journeysToCalculateChange: OptionToRecalculateDto[];
81
+ customerCode: string;
82
+ journeysToCalculateChange: JourneyToChangeDto[];
82
83
  }
83
84
  export interface IApplyOfferChangesReqDto {
84
85
  supplierSearchId: string;
85
- journeysToApplyChange: OptionToRecalculateDto[];
86
+ journeysToApplyChange: JourneyToChangeDto[];
86
87
  paymentDataHash: string;
87
88
  passengersInfo: IPassengerInfo[];
88
89
  }
@@ -113,3 +114,8 @@ export interface IListOffersReqDto {
113
114
  export interface IListChangeOptionsReqDto {
114
115
  searchData: IListOffersReqDto[];
115
116
  }
117
+ export interface ICreateFlightChangeSessionReqDto {
118
+ customerCode: string;
119
+ change_type: ChangeFlightType;
120
+ journeys_to_change: JourneyToChangeDto[];
121
+ }
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
+ ;
@@ -2,7 +2,7 @@ import { IListOffersFiltersInfo, ISmAzulOffer, ISmWcfOffer, IPriceDetails, IWcfC
2
2
  import { CredentialTypeEnum, Nullable, BookingConfirmationStatus } from "../../common";
3
3
  import { IAzulCredentials, IAzulFareDetails } from "../../sm-azul";
4
4
  import { AmadeusCredentials, SmAmadeusOffer } from "../../sm-amadeus";
5
- import { EnrichedJourneyOptions } from "../../api-core/flight-controller/responses";
5
+ import { EnrichedJourneyOptions, PaymentDetails } from "../../api-core/flight-controller/responses";
6
6
  export interface IListFareFamiliesResDto {
7
7
  fareFamilies: ISmWcfFamilyOffer[];
8
8
  }
@@ -164,11 +164,7 @@ export interface IRecalculateOfferChangesResDto {
164
164
  old_journey_id: string;
165
165
  new_journey_id: string;
166
166
  }[];
167
- payment_info: {
168
- currency_code: string;
169
- amount_to_pay: number;
170
- amount: number;
171
- };
167
+ payment_info: PaymentDetails;
172
168
  }
173
169
  export interface IListChangeOptionsResDto {
174
170
  journeys: EnrichedJourneyOptions[];
@@ -176,4 +172,12 @@ export interface IListChangeOptionsResDto {
176
172
  export interface IGetSupplierOffersResDto {
177
173
  supplierOffers: ISmWcfOffer[];
178
174
  }
175
+ export interface ICreateFlightChangeSessionResDto {
176
+ baseOfferId: number;
177
+ changeOfferId: number;
178
+ recalculateInfo: {
179
+ isPossible: boolean;
180
+ forecastedPrice: Nullable<number>;
181
+ };
182
+ }
179
183
  export {};
@@ -178,25 +178,6 @@ export type RecalculateCarOfferRequestDto = {
178
178
  additionals: RecalculateOfferAdditional[];
179
179
  clientCredential: ClientCarCredential;
180
180
  };
181
- export type SearchCarFilters = {
182
- minSearchRadius: number;
183
- maxSearchRadius: number;
184
- };
185
- export type ListCarOffersRequestDto = {
186
- pickupLatitude: string;
187
- pickupLongitude: string;
188
- pickupHour: number;
189
- pickupMinute: number;
190
- pickupDate: string;
191
- diffDropoff: boolean;
192
- dropoffDate: string;
193
- dropoffLatitude: string;
194
- dropoffLongitude: string;
195
- dropoffHour: number;
196
- dropoffMinute: number;
197
- searchFilters: SearchCarFilters;
198
- clientCredentials: ClientCarCredential[];
199
- };
200
181
  export type ClientCarCredential = {
201
182
  supplier: CarSupplier;
202
183
  agencyCode?: string;
@@ -279,6 +260,7 @@ export interface ListOffersRequest {
279
260
  }
280
261
  export interface SearchFilters {
281
262
  maxSearchRadius: number;
263
+ extendedSearchRadius: number;
282
264
  }
283
265
  export type RecalculateOfferAdditional = {
284
266
  code: string;