sm-types 1.8.7 → 1.8.8

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.8",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",
@@ -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;