sm-types 1.8.7 → 1.8.9

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/index.d.ts CHANGED
@@ -42,7 +42,6 @@ export declare const CABIN_CLASS_TYPES: {
42
42
  readonly value: "first";
43
43
  };
44
44
  };
45
- export type OfferJSON = IBusJSON | ICarJSON | IHotelJSON | IRideJSON | IFlightJSON;
46
45
  export interface IFlightJSON {
47
46
  price: number;
48
47
  search: IOfferSearch;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.8.7",
6
+ "version": "1.8.9",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,3 +1,4 @@
1
+ import { Nullable } from "../common";
1
2
  export interface ISmCarsAgency {
2
3
  code: string;
3
4
  active: boolean;
@@ -71,7 +72,7 @@ export interface ISmCarFeeInfo {
71
72
  export interface ISmCarAdditionalPriceInfo {
72
73
  name: string;
73
74
  supplierCategory: string;
74
- supplierId: number | null;
75
+ supplierId: Nullable<string>;
75
76
  selected: boolean;
76
77
  allowChange: boolean;
77
78
  rawPrice: number;
@@ -143,4 +144,65 @@ export interface ListOffersResponseData {
143
144
  data: ListOffersResponse;
144
145
  message?: string;
145
146
  }
147
+ export type CarReservationCustomerPhoneDto = {
148
+ ddi: string;
149
+ ddd: string;
150
+ number: string;
151
+ };
152
+ export type CarReservationCustomerDto = {
153
+ namePrefix?: string | null;
154
+ firstName: string;
155
+ lastName: string;
156
+ cpf: string;
157
+ email: string;
158
+ phone: CarReservationCustomerPhoneDto;
159
+ };
160
+ export type ReserveCarOfferRequestDto = {
161
+ customer: CarReservationCustomerDto;
162
+ paymentInfo: CarReservationPaymentInfoDto;
163
+ };
164
+ export type CarReservationPaymentInfoDto = {
165
+ category: CarPaymentCategory;
166
+ };
167
+ export declare enum CarPaymentCategory {
168
+ AgencyBilled = "AGENCY_BILLED",
169
+ CompanyBilled = "COMPANY_BILLED",
170
+ Balcony = "BALCONY"
171
+ }
172
+ export type RecalculateCarOfferAdditionals = {
173
+ supplierId: string;
174
+ quantity: string;
175
+ };
176
+ export type RecalculateCarOfferRequestDto = {
177
+ offerId: string;
178
+ additionals: RecalculateCarOfferAdditionals[];
179
+ };
180
+ export type SearchCarFilters = {
181
+ minSearchRadius: number;
182
+ maxSearchRadius: number;
183
+ };
184
+ export type ListCarOffersRequestDto = {
185
+ pickupLatitude: string;
186
+ pickupLongitude: string;
187
+ pickupHour: number;
188
+ pickupMinute: number;
189
+ pickupDate: string;
190
+ diffDropoff: boolean;
191
+ dropoffDate: string;
192
+ dropoffLatitude: string;
193
+ dropoffLongitude: string;
194
+ dropoffHour: number;
195
+ dropoffMinute: number;
196
+ searchFilters: SearchCarFilters;
197
+ clientCredentials: ClientCarCredential[];
198
+ };
199
+ export type ClientCarCredential = {
200
+ supplier: CarSupplier;
201
+ agencyCode?: string;
202
+ customerCode?: string;
203
+ };
204
+ export declare enum CarSupplier {
205
+ LOCALIZA = "localiza",
206
+ MOVIDA = "movida"
207
+ }
146
208
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeeType = exports.TransmissionType = exports.SteeringType = void 0;
3
+ exports.CarSupplier = exports.CarPaymentCategory = exports.FeeType = exports.TransmissionType = exports.SteeringType = void 0;
4
4
  exports.SteeringType = {
5
5
  HYDRAULIC: "hydraulic",
6
6
  ELETRIC: "eletric",
@@ -14,3 +14,14 @@ exports.FeeType = {
14
14
  SERVICE_FEE: "serviceFee",
15
15
  RETURN_FEE: "returnFee",
16
16
  };
17
+ var CarPaymentCategory;
18
+ (function (CarPaymentCategory) {
19
+ CarPaymentCategory["AgencyBilled"] = "AGENCY_BILLED";
20
+ CarPaymentCategory["CompanyBilled"] = "COMPANY_BILLED";
21
+ CarPaymentCategory["Balcony"] = "BALCONY";
22
+ })(CarPaymentCategory = exports.CarPaymentCategory || (exports.CarPaymentCategory = {}));
23
+ var CarSupplier;
24
+ (function (CarSupplier) {
25
+ CarSupplier["LOCALIZA"] = "localiza";
26
+ CarSupplier["MOVIDA"] = "movida";
27
+ })(CarSupplier = exports.CarSupplier || (exports.CarSupplier = {}));
@@ -1,4 +1,4 @@
1
- import { BookingStatus, ITagStatus, Nullable, OfferJSON, OfferStatus, ServiceType } from "../../common";
1
+ import { BookingStatus, IBusJSON, ICarJSON, IFlightJSON, IHotelJSON, IRideJSON, ITagStatus, Nullable, OfferStatus, ServiceType } from "../../common";
2
2
  import { BookerParticipantType, EventInviteStatus, EventParticipantType, EventPrivacy, ParticipantioStatus } from "../enums";
3
3
  export type BasicCompanyEvent = {
4
4
  token: string;
@@ -30,9 +30,22 @@ export type OfferInfo = {
30
30
  booking_status: BookingStatus;
31
31
  offer_status: OfferStatus;
32
32
  tag_status: ITagStatus;
33
- type: ServiceType;
34
- offer: OfferJSON;
35
- };
33
+ } & ({
34
+ offer: IBusJSON;
35
+ type: ServiceType.BUS;
36
+ } | {
37
+ offer: ICarJSON;
38
+ type: ServiceType.CAR;
39
+ } | {
40
+ offer: IFlightJSON;
41
+ type: ServiceType.FLIGHT;
42
+ } | {
43
+ offer: IHotelJSON;
44
+ type: ServiceType.HOTEL;
45
+ } | {
46
+ offer: IRideJSON;
47
+ type: ServiceType.RIDE;
48
+ });
36
49
  export type BasicEventParticipant = {
37
50
  token: string;
38
51
  event_token: string;